From 5838e320aef55ed3788b955066a4ef8517c6046e Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 25 Feb 2020 12:58:13 +0400 Subject: [PATCH] Fix possible crash in sticker inline results. --- .../SourceFiles/inline_bots/inline_bot_layout_internal.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp index 960ec1078..a29cadc62 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp @@ -482,8 +482,9 @@ void Sticker::setupLottie(not_null 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); }