diff --git a/gb.gtk/src/gcontrol.cpp b/gb.gtk/src/gcontrol.cpp index 69d6c39d2..6440d4fb6 100644 --- a/gb.gtk/src/gcontrol.cpp +++ b/gb.gtk/src/gcontrol.cpp @@ -258,6 +258,8 @@ void gControl::cleanRemovedControls() if (!iter) break; control = (gControl *)iter->data; + if (control->parent()) + control->parent()->remove(control); //controls_destroyed = g_list_remove(controls_destroyed, (gpointer)control); gtk_widget_destroy(control->border); } @@ -414,9 +416,6 @@ void gControl::destroy() //fprintf(stderr, "added to destroy list: %p\n", this); controls_destroyed = g_list_prepend(controls_destroyed,(gpointer)this); _destroyed = true; - - if (pr) - pr->remove(this); }