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

This commit is contained in:
Davide Pesavento 2025-07-17 22:43:45 -04:00 committed by GitHub
parent 67381754fa
commit 01b81c74ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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