diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-09 23:32:57 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-09 23:32:57 +0100 |
commit | 9deac08466eb1b01e0d5a82c6923705bd1922aa0 (patch) | |
tree | 3896c3dd13a3c41f77b0a2ec8555d3ec15a2b0a7 | |
parent | 359b87fa8bd3a77dc097c1c125c5b3e7cc9b43ee (diff) | |
download | RustAndDust-9deac08466eb1b01e0d5a82c6923705bd1922aa0.zip RustAndDust-9deac08466eb1b01e0d5a82c6923705bd1922aa0.tar.gz |
Config: protect load(String) against null payload
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Config.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Config.java b/core/src/ch/asynk/rustanddust/game/Config.java index fccd142..9fd3a43 100644 --- a/core/src/ch/asynk/rustanddust/game/Config.java +++ b/core/src/ch/asynk/rustanddust/game/Config.java @@ -116,6 +116,7 @@ public class Config public void load(String payload) { + if (payload == null) return; JsonValue root = new JsonReader().parse(payload); this.gameMode = GameMode.valueOf(root.getString("mode")); this.debug = root.getBoolean("debug"); |