Qt: Fix crash on triggering certain actions before display widget is created (#3482)

pull/3483/head
Davide Pesavento 4 months ago committed by GitHub
parent 67381754fa
commit 01b81c74ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3200,7 +3200,7 @@ MainWindow::SystemLock MainWindow::pauseAndLockSystem()
// Now we'll either have a borderless window, or a regular window (if we were exclusive fullscreen).
QWidget* dialog_parent = getDisplayContainer();
if (dialog_parent->parent())
if (!dialog_parent || dialog_parent->parent())
dialog_parent = this;
return SystemLock(dialog_parent, was_paused, was_fullscreen);

Loading…
Cancel
Save