Fix assertion violation when editing GIF / video.

If a GIF / video had no thumbnail the _animated flag was removed.
This commit is contained in:
John Preston 2017-05-01 11:03:56 +03:00
parent 5a8ce36181
commit aedbd6dfe4
1 changed files with 1 additions and 2 deletions

View File

@ -490,8 +490,7 @@ EditCaptionBox::EditCaptionBox(QWidget*, HistoryMedia *media, FullMsgId msgId) :
}
caption = media->getCaption().text;
if ((!_animated && (dimensions.isEmpty() || doc)) || image->isNull()) {
_animated = false;
if (!_animated && (dimensions.isEmpty() || doc || image->isNull())) {
if (image->isNull()) {
_thumbw = 0;
} else {