From 9fff2bf4c7f722034af696ed6f93c292159eca2e Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 10 Dec 2017 00:32:35 +0400 Subject: [PATCH] Fix one more crash in HistoryWidget. --- Telegram/SourceFiles/history/history_widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 556817298..ecb9dce23 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -3983,7 +3983,7 @@ void HistoryWidget::updateFieldPlaceholder() { auto text = _inlineBot->botInfo->inlinePlaceholder.mid(1); _field->setPlaceholder([text] { return text; }, _inlineBot->username.size() + 2); } else { - const auto peer = _history->peer; + const auto peer = _history ? _history->peer : nullptr; _field->setPlaceholder(langFactory( (peer && peer->isChannel() && !peer->isMegagroup()) ? (peer->notifySilentPosts()