From 530aae4bdb6f22376cec7c931be34a4dd8efda9f Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 21 Jul 2021 18:25:39 +0300 Subject: [PATCH] Fix crash in inline bots results. --- Telegram/SourceFiles/inline_bots/inline_bot_layout_item.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.cpp index a8b9b2a57..1a17eec8b 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.cpp @@ -198,7 +198,7 @@ ClickHandlerPtr ItemBase::getResultPreviewHandler() const { _result->_content_url, false); } else if (const auto document = _result->_document - ; document->createMediaView()->canBePlayed()) { + ; document && document->createMediaView()->canBePlayed()) { return std::make_shared(); } else if (_result->_photo) { return std::make_shared();