From 01b81c74ef69b92be70ec4edfe25f6ca6acc7da0 Mon Sep 17 00:00:00 2001 From: Davide Pesavento Date: Thu, 17 Jul 2025 22:43:45 -0400 Subject: [PATCH] Qt: Fix crash on triggering certain actions before display widget is created (#3482) --- src/duckstation-qt/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 2251abcf3..e3bcdc093 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -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);