From ccf23171d6e1ce347db0dc73d69820f3b13c9dce Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 30 Aug 2012 13:28:29 -0700 Subject: [PATCH] gtk: Avoid computing window-intersection when widget is destroyed. --- src/gtk/fix-layout.scm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/gtk/fix-layout.scm b/src/gtk/fix-layout.scm index b265f2c76..1fe0eedc4 100644 --- a/src/gtk/fix-layout.scm +++ b/src/gtk/fix-layout.scm @@ -883,14 +883,16 @@ USA. (not (fix:zero? (fix-rect-height extent)))) (for-each (lambda (widget) - (let ((intersect (let ((v (fix-layout-view widget))) - (and (fix-rect-nominal? v) - (window-intersection v extent))))) - (if (and intersect (not (gtk-widget-destroyed? widget))) - (C-call "gtk_widget_queue_draw_area" - (gobject-alien widget) - (fix-rect-x intersect) (fix-rect-y intersect) - (fix-rect-width intersect) (fix-rect-height intersect))))) + (if (not (gtk-widget-destroyed? widget)) + (let ((intersect (let ((v (fix-layout-view widget))) + (and (fix-rect-nominal? v) + (window-intersection v extent))))) + (if intersect + (C-call "gtk_widget_queue_draw_area" + (gobject-alien widget) + (fix-rect-x intersect) (fix-rect-y intersect) + (fix-rect-width intersect) + (fix-rect-height intersect)))))) (let ((widgets (fix-ink-widgets ink))) (if (eq? #t widgets) (fix-drawing-widgets drawing) -- 2.25.1