diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-05-03 20:00:12 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-05-03 20:00:12 -0400 |
commit | 7d2e2ac3ae9b394b47b87455ca106b9250165cbe (patch) | |
tree | 38b5a5aff92a1425512b1556c4cdeff5a3c8bf90 | |
parent | 5a688b2200c0f91e36b791c375761c3158bbacda (diff) |
scene: Detect improper detachment of current scene.
-rw-r--r-- | starling/scene.scm | 4 |
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) |