From 81a56ba815231c5f049a0a95bd184ff28b79e032 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Wed, 27 Jun 2018 07:42:10 -0500 Subject: [PATCH] proton: Don't crash if we're missing SteamGameId --- proton | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/proton b/proton index 67a12f7d..d03c9f9c 100755 --- a/proton +++ b/proton @@ -123,11 +123,14 @@ if not "noesync" in config_opts: env["WINEESYNC"] = "1" lfile = None -if env["WINEDEBUG"] != "-all": - lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log" - if os.path.exists(lfile_path): - os.remove(lfile_path) - lfile = open(lfile_path, "w+") +if "SteamGameId" in env: + if env["WINEDEBUG"] != "-all": + lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log" + if os.path.exists(lfile_path): + os.remove(lfile_path) + lfile = open(lfile_path, "w+") +else: + env["WINEDEBUG"] = "-all" prefix_lock = FileLock(os.environ["STEAM_COMPAT_DATA_PATH"] + "/pfx.lock", timeout=-1) with prefix_lock: