diff --git a/src/main/java/edu/rpi/legup/model/Puzzle.java b/src/main/java/edu/rpi/legup/model/Puzzle.java index 9467afc5b..38b0d8e6b 100644 --- a/src/main/java/edu/rpi/legup/model/Puzzle.java +++ b/src/main/java/edu/rpi/legup/model/Puzzle.java @@ -220,6 +220,9 @@ public boolean isValidTextInput(String[] statements) { * @return true if the board was solved correctly, false otherwise */ public boolean isPuzzleComplete() { + if (tree == null) + return false; + boolean isComplete = tree.isValid(); if (isComplete) { for (TreeElement leaf : tree.getLeafTreeElements()) {