Fix possible crash in sticker inline results.

This commit is contained in:
John Preston 2020-02-25 12:58:13 +04:00
parent d27dd512c5
commit 5838e320ae

View File

@ -482,8 +482,9 @@ void Sticker::setupLottie(not_null<DocumentData*> document) const {
void Sticker::prepareThumbnail() const {
if (const auto document = getShownDocument()) {
if (document->sticker()->animated
&& !_lottie
if (!_lottie
&& document->sticker()
&& document->sticker()->animated
&& document->loaded()) {
setupLottie(document);
}