diff options
-rw-r--r-- | catbird/node-2d.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/catbird/node-2d.scm b/catbird/node-2d.scm index 79a0dba..6e9c197 100644 --- a/catbird/node-2d.scm +++ b/catbird/node-2d.scm @@ -818,10 +818,12 @@ PADDING on all sides." #:init-form blend:alpha)) (define-method (default-width (sprite <sprite>)) - (texture-width (texture sprite))) + (let ((t (texture sprite))) + (if t (texture-width t) 0.0))) (define-method (default-height (sprite <sprite>)) - (texture-height (texture sprite))) + (let ((t (texture sprite))) + (if t (texture-height t) 0.0))) (define-method (on-change (sprite <sprite>) slot-name old new) (case slot-name |