Fix crash in last message checking.

Fixes #5683.
This commit is contained in:
John Preston 2019-02-12 16:53:46 +03:00
parent 818662c2e6
commit fe1f198d99

View file

@ -2089,8 +2089,9 @@ void History::setLastMessage(HistoryItem *item) {
if (_lastMessage) {
if (*_lastMessage == item) {
return;
} else if (!IsServerMsgId((*_lastMessage)->id)
&& (*_lastMessage)->date() > item->date()) {
} else if (*_lastMessage
&& !IsServerMsgId((*_lastMessage)->id)
&& (*_lastMessage)->date() > item->date()) {
return;
}
}