Fix one more crash in HistoryWidget.

This commit is contained in:
John Preston 2017-12-10 00:32:35 +04:00
parent 534058fe9b
commit 9fff2bf4c7

View file

@ -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()