diff options
-rw-r--r-- | chickadee/graphics/engine.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chickadee/graphics/engine.scm b/chickadee/graphics/engine.scm index 7595c72..bbb1667 100644 --- a/chickadee/graphics/engine.scm +++ b/chickadee/graphics/engine.scm @@ -3,6 +3,7 @@ #:use-module (chickadee math matrix) #:use-module (gl) #:use-module (ice-9 atomic) + #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (system foreign) @@ -260,9 +261,9 @@ (let ((guardian (graphics-engine-guardian engine))) (let loop ((obj (guardian))) (when obj - (let ((finalizer (find (lambda (f) - (let ((pred (graphics-finalizer-predicate f))) - (pred obj))) + (let ((finalizer (find (match-lambda + ((name . f) + ((graphics-finalizer-predicate f) obj))) (atomic-box-ref *graphics-finalizers*)))) (if finalizer ((graphics-finalizer-free finalizer) obj) |