From 3f4157bab29dee78b74aa7aae68e0ea273c42dc2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 27 Aug 2024 16:57:06 +0400 Subject: [PATCH] Fix crash in unlock with chat in separate window. Fixes #28306, fixes #28319. --- Telegram/SourceFiles/mainwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index c87515042..b4b088e6f 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -1242,7 +1242,8 @@ bool MainWidget::showHistoryInDifferentWindow( const SectionShow ¶ms, MsgId showAtMsgId) { if (!peerId) { - return false; + // In case we don't have dialogs, we can't clear section stack. + return !_dialogs; } const auto peer = session().data().peer(peerId); if (const auto separateChat = _controller->windowId().chat()) {