Fix possible crash.

This commit is contained in:
John Preston 2018-05-10 17:15:04 +03:00
parent bb6ab5314c
commit 96c0c30f7c

View file

@ -1731,11 +1731,14 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re
_membersDropdown.destroy();
_scrollToAnimation.finish();
_history = _migrated = nullptr;
_list = nullptr;
_peer = nullptr;
_channel = NoChannel;
_canSendMessages = false;
_silent.destroy();
updateBotKeyboard();
} else {
Assert(_list == nullptr);
}
App::clearMousedItems();
@ -1750,7 +1753,6 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re
_membersDropdownShowTimer.stop();
_scroll->takeWidget<HistoryInner>().destroy();
_list = nullptr;
clearInlineBot();