From 264e35a6a86809be1854eea5e82634faa6c5fabb Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 14 May 2024 17:16:02 +0300 Subject: [PATCH] Fixed rare crash in photo editor when editing media in message. --- Telegram/SourceFiles/boxes/edit_caption_box.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegram/SourceFiles/boxes/edit_caption_box.cpp b/Telegram/SourceFiles/boxes/edit_caption_box.cpp index 5ffdfb6f36..be4d4e7fad 100644 --- a/Telegram/SourceFiles/boxes/edit_caption_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_caption_box.cpp @@ -206,6 +206,9 @@ void EditPhotoImage( Storage::UpdateImageDetails(file, previewWidth, sideLimit); done(std::move(list)); }; + if (!large) { + return; + } const auto fileImage = std::make_shared(*large); auto editor = base::make_unique_q( parent,