|author||David Thompson <email@example.com>||2020-12-16 08:49:52 -0500|
|committer||David Thompson <firstname.lastname@example.org>||2020-12-16 08:49:52 -0500|
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.
1 files changed, 1 insertions, 1 deletions
diff --git a/starling/node.scm b/starling/node.scm
index 631f113..6ddcd2c 100644
@@ -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.