From a52b9313f87d0ca68ea3dd652a94591f3de5a186 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 29 Sep 2023 16:42:01 -0400 Subject: [PATCH] Fixed a bug where file wouldn't save due to batch grader updates --- src/main/java/edu/rpi/legup/model/Puzzle.java | 3 +++ 1 file changed, 3 insertions(+) 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()) {