From 8406d8c39428b3a68974c1dcf998b93632206aad Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 16 Dec 2020 08:49:52 -0500 Subject: 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. --- starling/node.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) 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. -- cgit v1.2.3