From 9892e2b286bcb01dfce2bd723d760c4e64cd0803 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sat, 24 Nov 2018 18:52:22 +0100 Subject: Enable use of assertions Assertions are faster and normally not enabled, so they are a good to debug when things that *should* never happen, happen. --- src/subconscious/graphics/GameWindow.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/subconscious/graphics/GameWindow.java b/src/subconscious/graphics/GameWindow.java index f444a6a..eb360f5 100644 --- a/src/subconscious/graphics/GameWindow.java +++ b/src/subconscious/graphics/GameWindow.java @@ -150,9 +150,7 @@ public class GameWindow extends Frame implements WindowListener { this.root.getLayout().removeLayoutComponent(this.scene); this.root.remove(this.scene); - if (this.loadedScenes.empty()) { - throw new IllegalStateException(); - } + assert !this.loadedScenes.empty(); // load the last scene SimpleEntry sceneEntry = this.loadedScenes.pop(); -- cgit v1.2.1