From 91754f0b95a9ab2e81e84f51819b01a02a13815e Mon Sep 17 00:00:00 2001 From: mainzelm Date: Fri, 24 Oct 2003 11:38:38 +0000 Subject: [PATCH] Add check for windows being #f. --- src/utils.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils.scm b/src/utils.scm index b70e359..1758a77 100644 --- a/src/utils.scm +++ b/src/utils.scm @@ -295,8 +295,11 @@ (window-path dpy p))))) (define (window-viewable? dpy window) - (eq? (window-attribute:map-state (get-window-attributes dpy window)) - (map-state is-viewable))) + (and window + (let ((attrs (get-window-attributes dpy window))) + (and attrs + (eq? (window-attribute:map-state attrs) + (map-state is-viewable)))))) (define (window-mapped? dpy window) (and window