From 8c93bbbe892493af8d80e18f8faed61df6fcbf0d Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Tue, 18 Dec 2012 17:57:51 -0700 Subject: [PATCH] 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). --- src/gtk/gtk-widget.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.25.1