mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fix crash in EditCaptionBox.
This commit is contained in:
@@ -115,6 +115,9 @@ EditCaptionBox::EditCaptionBox(
|
||||
_refreshThumbnail();
|
||||
}
|
||||
} else {
|
||||
if (!image) {
|
||||
image = Image::BlankMedia();
|
||||
}
|
||||
int32 maxW = 0, maxH = 0;
|
||||
if (_animated) {
|
||||
int32 limitW = st::sendMediaPreviewSize;
|
||||
@@ -201,7 +204,9 @@ EditCaptionBox::EditCaptionBox(
|
||||
? _thumbnailImage->loaded()
|
||||
: true;
|
||||
subscribe(Auth().downloaderTaskFinished(), [=] {
|
||||
if (!_thumbnailImageLoaded && _thumbnailImage->loaded()) {
|
||||
if (!_thumbnailImageLoaded
|
||||
&& _thumbnailImage
|
||||
&& _thumbnailImage->loaded()) {
|
||||
_thumbnailImageLoaded = true;
|
||||
_refreshThumbnail();
|
||||
update();
|
||||
|
Reference in New Issue
Block a user