summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-01-26 18:16:37 -0500
committerDavid Thompson <dthompson2@worcester.edu>2021-01-26 18:16:37 -0500
commitc356e8f4e82e89508867c90add122cf015166301 (patch)
tree0410fbb5966559620e62675c72fe19192373b423
parente6eb5eee7e9025c2f6c65d7ca8bbae52e32c69db (diff)
graphics: engine: Fix graphics-engine-reap!
-rw-r--r--chickadee/graphics/engine.scm7
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)