From 8992a492eb3fdab8f077b31de547c4d8926be93b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 21 Feb 2021 18:33:27 -0500 Subject: [PATCH] v0.9.2: fixed cases where bad game settings could crash on desktop --- .../java/com/watabou/utils/GameSettings.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/SPD-classes/src/main/java/com/watabou/utils/GameSettings.java b/SPD-classes/src/main/java/com/watabou/utils/GameSettings.java index 646f99340..7147cba35 100644 --- a/SPD-classes/src/main/java/com/watabou/utils/GameSettings.java +++ b/SPD-classes/src/main/java/com/watabou/utils/GameSettings.java @@ -23,6 +23,7 @@ package com.watabou.utils; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Preferences; +import com.watabou.noosa.Game; public class GameSettings { @@ -60,8 +61,8 @@ public class GameSettings { } else { return i; } - } catch (ClassCastException e) { - //ShatteredPixelDungeon.reportException(e); + } catch (Exception e) { + Game.reportException(e); put(key, defValue); return defValue; } @@ -81,8 +82,8 @@ public class GameSettings { } else { return i; } - } catch (ClassCastException e) { - //ShatteredPixelDungeon.reportException(e); + } catch (Exception e) { + Game.reportException(e); put(key, defValue); return defValue; } @@ -91,9 +92,8 @@ public class GameSettings { public static boolean getBoolean( String key, boolean defValue ) { try { return get().getBoolean(key, defValue); - } catch (ClassCastException e) { - //ShatteredPixelDungeon.reportException(e); - put(key, defValue); + } catch (Exception e) { + Game.reportException(e); return defValue; } } @@ -111,8 +111,8 @@ public class GameSettings { } else { return s; } - } catch (ClassCastException e) { - //ShatteredPixelDungeon.reportException(e); + } catch (Exception e) { + Game.reportException(e); put(key, defValue); return defValue; }