aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-combo-button.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-combo-button.c')
-rw-r--r--widgets/misc/e-combo-button.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c
index 933c4e8ae4..b4c75073fe 100644
--- a/widgets/misc/e-combo-button.c
+++ b/widgets/misc/e-combo-button.c
@@ -248,18 +248,21 @@ impl_destroy (GtkObject *object)
combo_button = E_COMBO_BUTTON (object);
priv = combo_button->priv;
- if (priv->arrow_pixmap != NULL) {
- gtk_widget_destroy (priv->arrow_pixmap);
- priv->arrow_pixmap = NULL;
- }
+ if (priv) {
+ if (priv->arrow_pixmap != NULL) {
+ gtk_widget_destroy (priv->arrow_pixmap);
+ priv->arrow_pixmap = NULL;
+ }
+
+ if (priv->icon != NULL) {
+ g_object_unref (priv->icon);
+ priv->icon = NULL;
+ }
- if (priv->icon != NULL) {
- g_object_unref (priv->icon);
- priv->icon = NULL;
+ g_free (priv);
+ combo_button->priv = NULL;
}
-
- g_free (priv);
-
+
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}