From 276ef42c8ff0f2f67b303813c4778a9818f97731 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 24 Nov 2014 11:23:39 +0300 Subject: [PATCH] fixed crash in win version --- Telegram/SourceFiles/window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 5f694869a..c57d0ba6c 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -261,12 +261,14 @@ void NotifyWindow::startHiding() { void NotifyWindow::mousePressEvent(QMouseEvent *e) { if (!history) return; + PeerId peer = history->peer->id; + if (e->button() == Qt::RightButton) { unlinkHistoryAndNotify(); } else if (history) { App::wnd()->showFromTray(); App::wnd()->hideSettings(); - App::main()->showPeer(history->peer->id, 0, false, true); + App::main()->showPeer(peer, 0, false, true); e->ignore(); } }