Fix crash in inline bots results.

This commit is contained in:
John Preston 2021-07-21 18:25:39 +03:00 committed by RadRussianRus
parent 920a2c300e
commit f10ab1e547

View file

@ -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<OpenFileClickHandler>();
} else if (_result->_photo) {
return std::make_shared<OpenFileClickHandler>();