[glade/glade-3-38] GladeWidget: unset parent and object on rebuild



commit 16bf89e11201bb25726dd1f369753f89d4c414a0
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Fri Oct 2 16:04:51 2020 -0300

    GladeWidget: unset parent and object on rebuild
    
    We need to make sure internal widgets parent and object are unset
    while rebuilding to avoid having a GladeWidget with a dead object.

 gladeui/glade-widget.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index a93cce8c..2b5f5437 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -1805,6 +1805,9 @@ glade_widget_extract_children (GladeWidget *gwidget)
 
           extract_list = g_list_prepend (extract_list, extract);
 
+          /* Internal GladeWidget are no longer needed */
+          glade_widget_set_object (gchild, NULL);
+          glade_widget_set_parent (gchild, NULL);
         }
       else if (gchild || GLADE_IS_PLACEHOLDER (child))
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]