From 15ae32ae84700a764e93297900bd6053d310a5dd Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Tue, 2 Aug 2016 21:04:13 +0200 Subject: [PATCH] Fix NPE --- .../main/java/io/github/dre2n/dungeonsxl/game/GameRules.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/github/dre2n/dungeonsxl/game/GameRules.java b/core/src/main/java/io/github/dre2n/dungeonsxl/game/GameRules.java index 96151d7f..8868db05 100644 --- a/core/src/main/java/io/github/dre2n/dungeonsxl/game/GameRules.java +++ b/core/src/main/java/io/github/dre2n/dungeonsxl/game/GameRules.java @@ -422,7 +422,9 @@ public class GameRules { } if (initialLives == null) { - initialLives = defaultValues.hasLives() ? null : -1; + if (defaultValues.hasLives() != null) { + initialLives = defaultValues.hasLives() ? null : -1; + } } }