summaryrefslogtreecommitdiffstats
path: root/src/subconscious/graphics/GameWindow.java
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-11-24 18:52:22 +0100
committerNao Pross <naopross@thearcway.org>2018-11-24 18:52:22 +0100
commit9892e2b286bcb01dfce2bd723d760c4e64cd0803 (patch)
tree348d06389e7c700206787102bee18c4945707004 /src/subconscious/graphics/GameWindow.java
parentCall Game.update() on Scene loop (diff)
downloadSubconscious-java-9892e2b286bcb01dfce2bd723d760c4e64cd0803.tar.gz
Subconscious-java-9892e2b286bcb01dfce2bd723d760c4e64cd0803.zip
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.
Diffstat (limited to 'src/subconscious/graphics/GameWindow.java')
-rw-r--r--src/subconscious/graphics/GameWindow.java4
1 files changed, 1 insertions, 3 deletions
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<Scene, Thread> sceneEntry = this.loadedScenes.pop();