2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

some crashes fixed

This commit is contained in:
John Preston
2016-02-14 18:58:39 +03:00
parent a439fc32da
commit e492b1e93d
9 changed files with 47 additions and 33 deletions

View File

@@ -1185,7 +1185,7 @@ void MainWidget::checkedHistory(PeerData *peer, const MTPmessages_Messages &resu
History *h = App::history(peer->id);
if (!h->lastMsg) {
HistoryItem *item = h->addNewMessage((*v)[0], NewMessageLast);
if (collapsed && !collapsed->isEmpty() && collapsed->at(0).type() == mtpc_messageGroup && h->isChannel()) {
if (item && collapsed && !collapsed->isEmpty() && collapsed->at(0).type() == mtpc_messageGroup && h->isChannel()) {
if (collapsed->at(0).c_messageGroup().vmax_id.v > item->id) {
if (h->asChannelHistory()->onlyImportant()) {
h->asChannelHistory()->clearOther();