From 0e75f34d372d57999f217c33c8e5e7b1d7661c40 Mon Sep 17 00:00:00 2001 From: Sekers <46898253+Sekers@users.noreply.github.com> Date: Wed, 28 Oct 2026 23:36:07 -0500 Subject: [PATCH] Cyberpunk: skip crash message without main window --- games/game_cyberpunk2077.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/games/game_cyberpunk2077.py b/games/game_cyberpunk2077.py index 83587969..f13d71ac 100644 --- a/games/game_cyberpunk2077.py +++ b/games/game_cyberpunk2077.py @@ -228,7 +228,7 @@ class Cyberpunk2077Game(BasicGame): _redmod_deploy_args = "deploy -reportProgress" """Deploy arguments for `redmod.exe`, -modlist=... is added.""" - _parentWidget: QWidget + _parentWidget: QWidget | None = None """Set with `_organizer.onUserInterfaceInitialized()`""" def init(self, organizer: mobase.IOrganizer) -> bool: @@ -530,6 +530,8 @@ def _onAboutToRun(self, app_path_str: str, wd: QDir, args: str) -> bool: def _onFinishedRun(self, path: str, exit_code: int) -> None: if not self._get_setting("crash_message"): return + if self._parentWidget is None: + return # No main window: MO started from command line or shortcut if path.endswith(self.binaryName()) and exit_code > 0: crash_message = QMessageBox( QMessageBox.Icon.Critical,