1
0
mirror of https://github.com/lutris/lutris synced 2024-07-05 16:38:42 +00:00

Return default ID if no game is provided

This commit is contained in:
Mathieu Comandon 2024-03-28 23:14:52 -07:00
parent 738bda4bb4
commit 2abe2323f7

View File

@ -98,7 +98,7 @@ def get_proton_path_from_bin(wine_path):
def get_game_id(game):
games_path = os.path.join(settings.RUNTIME_DIR, "umu-games/umu-games.json")
if not os.path.exists(games_path):
if not os.path.exists(games_path) or not game:
return DEFAULT_GAMEID
with open(games_path, "r", encoding="utf-8") as games_file:
umu_games = json.load(games_file)