From 5a38cb4581122f76766bde0cf0edbc38bc074346 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 12 Jul 2015 18:39:56 +0300 Subject: [PATCH] fixed crash --- Telegram/SourceFiles/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 00f713269d..ffdab7f458 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1426,7 +1426,7 @@ void Window::notifyShowNext(NotifyWindow *remove) { if (j == notifyWhenMaps.end()) { history->clearNotifications(); i = notifyWaiters.erase(i); - if (notifyHistory) notifyWaiter = notifyWaiters.find(notifyHistory); + notifyWaiter = notifyHistory ? notifyWaiters.find(notifyHistory) : notifyWaiters.end(); continue; } do { @@ -1442,7 +1442,7 @@ void Window::notifyShowNext(NotifyWindow *remove) { if (!history->currentNotification()) { notifyWhenMaps.remove(history); i = notifyWaiters.erase(i); - if (notifyHistory) notifyWaiter = notifyWaiters.find(notifyHistory); + notifyWaiter = notifyHistory ? notifyWaiters.find(notifyHistory) : notifyWaiters.end(); continue; } uint64 when = i.value().when;