diff --git a/scheme/xlib/gcontext.scm b/scheme/xlib/gcontext.scm index 4b3242d..e3c6051 100644 --- a/scheme/xlib/gcontext.scm +++ b/scheme/xlib/gcontext.scm @@ -276,7 +276,8 @@ (define (make-gcontext-getter name) (lambda (gcontext) - (cdr (assq name (get-gcontext-values gcontext))))) + (let ((values (get-gcontext-values gcontext))) + (and values (cdr (assq name values)))))) (define gcontext-function (make-gcontext-getter (gc-value function))) (define gcontext-plane-mask (make-gcontext-getter (gc-value plane-mask)))