[glade] GladeEditorProperty: Avoid assertion when loading NULL widget.



commit 493dcd42e2a5c6df0a84835489dd87769df2a44b
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Apr 14 18:38:16 2013 +0900

    GladeEditorProperty: Avoid assertion when loading NULL widget.

 gladeui/glade-editor-property.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index a47c1bb..40ce118 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -2401,9 +2401,12 @@ glade_eprop_check_load (GladeEditorProperty *eprop, GladeProperty *property)
   editor_property_class->load (eprop, property);
 
   /* Load the inner label */
-  widget = glade_property_get_widget (property);
-  if (widget)
-    glade_editable_load (GLADE_EDITABLE (eprop_check->label), widget);
+  if (property)
+    {
+      widget = glade_property_get_widget (property);
+      if (widget)
+       glade_editable_load (GLADE_EDITABLE (eprop_check->label), widget);
+    }
 
   if (property)
     {


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