summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starling/scene.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/starling/scene.scm b/starling/scene.scm
index 7412727..cda1e4e 100644
--- a/starling/scene.scm
+++ b/starling/scene.scm
@@ -158,6 +158,10 @@
(()
(error "no scene to pop!" mux))))
+(define-method (on-detach (mux <scene-mux>) (scene <scene>))
+ (when (eq? scene (current-scene mux))
+ (error "current scene improperly detached. use push/pop/replace-scene instead.")))
+
(define-method (on-scenes-empty (mux <scene-mux>))
#t)