From: Matt Birkholz Date: Wed, 19 Dec 2012 00:57:51 +0000 (-0700) Subject: Do not remove a gtk-paned's child if it is destroyed. X-Git-Tag: mit-scheme-pucked-9.2.12~541 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8c93bbbe892493af8d80e18f8faed61df6fcbf0d;p=mit-scheme.git Do not remove a gtk-paned's child if it is destroyed. If it is destroyed, it has already been removed (from the list of children). --- diff --git a/src/gtk/gtk-widget.scm b/src/gtk/gtk-widget.scm index b144bf661..fbb4139a9 100644 --- a/src/gtk/gtk-widget.scm +++ b/src/gtk/gtk-widget.scm @@ -736,7 +736,7 @@ USA. (define (gtk-paned-pack1 paned child1 resize? shrink?) (guarantee-gtk-widget child1 'gtk-paned-pack1) (let ((existing (gtk-paned-get-child1 paned))) - (if existing + (if (and existing (not (gtk-widget-destroyed? existing))) (container-remove! paned existing))) (set-gtk-paned-child1! paned child1) (container-add! paned child1) @@ -746,7 +746,7 @@ USA. (define (gtk-paned-pack2 paned child2 resize? shrink?) (guarantee-gtk-widget child2 'gtk-paned-pack2) (let ((existing (gtk-paned-get-child2 paned))) - (if existing + (if (and existing (not (gtk-widget-destroyed? existing))) (container-remove! paned existing))) (set-gtk-paned-child2! paned child2) (container-add! paned child2)