crash fixed for 0.9.5

This commit is contained in:
John Preston 2015-10-14 16:11:42 +02:00
parent 12673ab6fe
commit 21570c0479

View File

@ -4305,9 +4305,12 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
history.update();
}
if (History *h = App::historyLoaded(id)) {
if (h->lastMsg->out() && h->lastMsg->id <= d.vmax_id.v) {
if (h->lastMsg && h->lastMsg->out() && h->lastMsg->id <= d.vmax_id.v) {
dlgUpdated(h, h->lastMsg->id);
}
if (!h->dialogs.isEmpty()) {
dlgUpdated(h->dialogs[0]);
}
}
ptsApplySkippedUpdates();