Skip to content

Commit

Permalink
Avoid hiding a window that isn't there.
Browse files Browse the repository at this point in the history
Resolves #5825
  • Loading branch information
danieljohnson2 committed Dec 29, 2024
1 parent 536e0d4 commit b52d0a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lutris/gui/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def on_settings_changed(self, setting_key, new_value):

def on_game_start(self, game: Game) -> None:
self._running_games.append(game)
if settings.read_setting("hide_client_on_game_start") == "True":
if self.window and settings.read_bool_setting("hide_client_on_game_start"):
self.window.hide() # Hide launcher window

def on_game_stopped(self, game: Game) -> None:
Expand All @@ -798,9 +798,9 @@ def on_game_stopped(self, game: Game) -> None:
else:
logger.debug("Game has already been removed from running IDs?")

if settings.read_bool_setting("hide_client_on_game_start") and not self.quit_on_game_exit:
if self.window and settings.read_bool_setting("hide_client_on_game_start") and not self.quit_on_game_exit:
self.window.show() # Show launcher window
elif not self.window.is_visible():
elif not self.window or not self.window.is_visible():
if not self.has_running_games:
if self.quit_on_game_exit or not self.has_tray_icon():
self.quit()
Expand Down

0 comments on commit b52d0a0

Please sign in to comment.