2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

a couple of crashes fixed, version 0.9.24 stable

This commit is contained in:
John Preston
2016-02-16 16:14:19 +03:00
parent a597ded99b
commit 80455492b0
8 changed files with 41 additions and 34 deletions

View File

@@ -963,7 +963,9 @@ void DialogsInner::dialogsReceived(const QVector<MTPDialog> &added) {
case mtpc_dialog: {
const MTPDdialog &d(i->c_dialog());
history = App::historyFromDialog(peerFromMTP(d.vpeer), d.vunread_count.v, d.vread_inbox_max_id.v);
App::main()->applyNotifySetting(MTP_notifyPeer(d.vpeer), d.vnotify_settings, history);
if (App::main()) {
App::main()->applyNotifySetting(MTP_notifyPeer(d.vpeer), d.vnotify_settings, history);
}
} break;
case mtpc_dialogChannel: {
@@ -986,7 +988,9 @@ void DialogsInner::dialogsReceived(const QVector<MTPDialog> &added) {
if (!history->isMegagroup() && d.vtop_message.v > d.vtop_important_message.v) {
history->setNotLoadedAtBottom();
}
App::main()->applyNotifySetting(MTP_notifyPeer(d.vpeer), d.vnotify_settings, history);
if (App::main()) {
App::main()->applyNotifySetting(MTP_notifyPeer(d.vpeer), d.vnotify_settings, history);
}
} break;
}