[gtk+/combo-refactor: 38/42] Fixing GtkComboBox dispose() method to check priv->area before unreffing.



commit bc837bf6fddcbb2921d474d07f49598f42119aa7
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Fri Nov 26 23:42:32 2010 +0900

    Fixing GtkComboBox dispose() method to check priv->area before unreffing.

 gtk/gtkcombobox.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 80473a9..e635041 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1040,8 +1040,11 @@ gtk_combo_box_dispose(GObject* object)
       combo_box->priv->popup_widget = NULL;
     }
 
-  g_object_unref (combo_box->priv->area);
-  combo_box->priv->area = NULL;
+  if (combo_box->priv->area)
+    {
+      g_object_unref (combo_box->priv->area);
+      combo_box->priv->area = NULL;
+    }
 
   G_OBJECT_CLASS (gtk_combo_box_parent_class)->dispose (object);
 }



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