default-trap-handler bugfix
authorAndy Wingo <wingo@pobox.com>
Sun, 19 Sep 2010 10:20:58 +0000 (12:20 +0200)
committerAndy Wingo <wingo@pobox.com>
Sun, 19 Sep 2010 10:20:58 +0000 (12:20 +0200)
* module/system/vm/trap-state.scm (default-trap-handler): Fix thinko.

module/system/vm/trap-state.scm

index 024bb20..4277dd3 100644 (file)
     (thunk)))
 
 (define (default-trap-handler frame idx trap-name)
-  (if %default-trap-handler
-      ((fluid-ref %default-trap-handler) frame idx trap-name)
-      (warn "Trap with no handler installed" frame idx trap-name)))
+  (let ((default-handler (fluid-ref %default-trap-handler)))
+    (if default-handler
+        (default-handler frame idx trap-name)
+        (warn "Trap with no handler installed" frame idx trap-name))))
 
 (define-record <trap-wrapper>
   index