2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

fixed crash in next/previous_chat(), MTP::dld/upl -> functions, download and upload sessions count reduced to 2

This commit is contained in:
John Preston
2016-02-29 14:34:44 +03:00
parent fcd713b8a6
commit 08072346fd
7 changed files with 34 additions and 30 deletions

View File

@@ -1522,6 +1522,11 @@ void DialogsInner::destroyData() {
}
void DialogsInner::peerBefore(const PeerData *inPeer, MsgId inMsg, PeerData *&outPeer, MsgId &outMsg) const {
if (!inPeer) {
outPeer = 0;
outMsg = 0;
return;
}
if (_state == DefaultState) {
DialogsList::RowByPeer::const_iterator i = dialogs.list.rowByPeer.constFind(inPeer->id);
if (i == dialogs.list.rowByPeer.constEnd()) {
@@ -1606,6 +1611,11 @@ void DialogsInner::peerBefore(const PeerData *inPeer, MsgId inMsg, PeerData *&ou
}
void DialogsInner::peerAfter(const PeerData *inPeer, MsgId inMsg, PeerData *&outPeer, MsgId &outMsg) const {
if (!inPeer) {
outPeer = 0;
outMsg = 0;
return;
}
if (_state == DefaultState) {
DialogsList::RowByPeer::const_iterator i = dialogs.list.rowByPeer.constFind(inPeer->id);
if (i == dialogs.list.rowByPeer.constEnd()) {