Qt: Fix crash on triggering certain actions before display widget is created

This commit is contained in:
Davide Pesavento 2025-07-17 17:36:44 -04:00
parent 67381754fa
commit d41e94567a

View File

@ -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);