From a16eedff46ebbf34ab1f4f0b0638f0c742f3a940 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Wed, 7 Sep 2011 18:20:01 +0200 Subject: [PATCH] Some activities segfault when closing, OLPC #11201 TurtleArt and Abacus are two known candidates Signed-off-by: Simon Schampijer Reviewed-by: Gonzalo Odiard --- src/sugar/graphics/toolbarbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sugar/graphics/toolbarbox.py b/src/sugar/graphics/toolbarbox.py index 2f455f5e..60e030e2 100644 --- a/src/sugar/graphics/toolbarbox.py +++ b/src/sugar/graphics/toolbarbox.py @@ -40,7 +40,7 @@ class ToolbarButton(ToolButton): def __hierarchy_changed_cb(self, tool_button, previous_toplevel): if hasattr(self.parent, 'owner'): - if self.page_widget: + if self.page_widget and previous_toplevel is None: self._unparent() self.parent.owner.pack_start(self.page_widget) self.set_expanded(False)