Fixed possible crash in OverlayWidget when video continues from PiP.

This commit is contained in:
23rd
2021-06-24 12:04:21 +03:00
committed by John Preston
parent 6b62ec97c6
commit 7decf68122
5 changed files with 47 additions and 21 deletions
@@ -209,7 +209,7 @@ base::binary_guard ReadImageAsync(
}
void ResolveDocument(
not_null<Window::SessionController*> controller,
Window::SessionController *controller,
not_null<DocumentData*> document,
HistoryItem *item) {
if (!document->date) {
@@ -222,7 +222,7 @@ void ResolveDocument(
&& document->isVideoFile()
&& !document->filepath().isEmpty()) {
File::Launch(document->location(false).fname);
} else {
} else if (controller) {
controller->openDocument(document, msgId, true);
}
};