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



commit 51f14c034e3a437128e77ce245db1240bda2e29d
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 da8db3e..2972ce9 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1074,8 +1074,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]