Fix crash in Pip-to-Viewer after message deletion.

Fixes #25262. Fixes #25522.
This commit is contained in:
John Preston 2022-12-30 14:18:04 +04:00
parent d02819db13
commit 0ce01410a1
1 changed files with 2 additions and 2 deletions

View File

@ -3334,14 +3334,14 @@ void OverlayWidget::switchToPip() {
Expects(_document != nullptr);
const auto document = _document;
const auto message = _message;
const auto messageId = _message ? _message->fullId() : FullMsgId();
const auto topicRootId = _topicRootId;
const auto closeAndContinue = [=] {
_showAsPip = false;
show(OpenRequest(
findWindow(false),
document,
message,
document->owner().message(messageId),
topicRootId,
true));
};