Fix crash in unlock with chat in separate window.

Fixes #28306, fixes #28319.
This commit is contained in:
John Preston 2024-08-27 16:57:06 +04:00
parent a98f559066
commit 3f4157bab2

View file

@ -1242,7 +1242,8 @@ bool MainWidget::showHistoryInDifferentWindow(
const SectionShow &params,
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()) {