From ee8e0653676568eb3b3c2a973a3b1723d094f537 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Tue, 19 May 2020 07:48:58 -0500 Subject: [PATCH] steam_helper: Catch JSON exceptions --- steam_helper/steam.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index bc0d8afb..b168618c 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -397,7 +397,16 @@ static bool convert_linux_vrpaths(void) static void setup_vrpaths(void) { - if(!convert_linux_vrpaths()) + bool success = false; + + try{ + success = convert_linux_vrpaths(); + }catch(std::exception e){ + WINE_ERR("got error parsing vrpaths file\n"); + success = false; + } + + if(!success) { /* delete the windows file only if the linux conversion fails */ WCHAR windows_vrpaths[MAX_PATH];