summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2020-12-16 08:49:52 -0500
committerDavid Thompson <dthompson@vistahigherlearning.com>2020-12-16 08:49:52 -0500
commit8406d8c39428b3a68974c1dcf998b93632206aad (patch)
tree51bbcae142a75db8105e0b0f4e2a1e022f53927a
parent81170b37a41ab347c6a5f74d2d648cd0b2173c9d (diff)
node: Short circuit update-tree if node is not booted.
This provides some safety for users doing things like calling update-tree on their own for some unattached subtree of nodes.
-rw-r--r--starling/node.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/starling/node.scm b/starling/node.scm
index 631f113..6ddcd2c 100644
--- a/starling/node.scm
+++ b/starling/node.scm
@@ -115,7 +115,7 @@
(define-method (update-tree (node <node>) dt)
"Update NODE and all of its children. DT is the amount of time
passed since the last update, in milliseconds."
- (unless (paused? node)
+ (unless (or (paused? node) (not (booted? node)))
;; Update children first, recursively.
(for-each-child (lambda (child) (update-tree child dt)) node)
;; Scripts take precedence over the update method.