diff options
author | waker <wakeroid@gmail.com> | 2012-12-01 12:35:33 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-12-01 12:35:33 +0100 |
commit | ed02eed49a291a314840802987c6c147adf6b4d4 (patch) | |
tree | 3af84c07cf241d2c01ebd96c099b27b5748e1884 /plugins | |
parent | a954e42b465dbe11293f0446978ddf443e8c520e (diff) |
gtkui: fixed crash caused by hvbox_replace
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/widgets.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/gtkui/widgets.c b/plugins/gtkui/widgets.c index 02b1af57..0f53f445 100644 --- a/plugins/gtkui/widgets.c +++ b/plugins/gtkui/widgets.c @@ -2275,6 +2275,8 @@ w_hvbox_replace (struct ddb_gtkui_widget_s *container, struct ddb_gtkui_widget_s return; } + w_remove (container, c); + w_destroy (c); if (prev) { prev->next = newchild; } @@ -2282,10 +2284,7 @@ w_hvbox_replace (struct ddb_gtkui_widget_s *container, struct ddb_gtkui_widget_s container->children = newchild; } newchild->next = c->next; - - gtk_container_remove (GTK_CONTAINER(b->box), c->widget); - c->widget = NULL; - w_destroy (c); + newchild->parent = container; gtk_box_pack_start (GTK_BOX (b->box), newchild->widget, TRUE, TRUE, 0); gtk_widget_show (newchild->widget); |