aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcut.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shortcut.c')
-rw-r--r--shell/e-shortcut.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/shell/e-shortcut.c b/shell/e-shortcut.c
index ed09abe932..532f38b175 100644
--- a/shell/e-shortcut.c
+++ b/shell/e-shortcut.c
@@ -33,8 +33,9 @@ static void
es_destroy (GtkObject *object)
{
EShortcut *ef = E_SHORTCUT (object);
-
- gtk_object_unref (GTK_OBJECT (ef->efolder));
+
+ if (ef->efolder != NULL)
+ gtk_object_unref (GTK_OBJECT (ef->efolder));
shortcut_parent_class->destroy (object);
}
@@ -57,8 +58,9 @@ esg_destroy (GtkObject *object)
for (i = 0; i < shortcut_count; i++){
EShortcut *es = g_array_index (efg->shortcuts, EShortcut *, i);
-
- gtk_object_unref (GTK_OBJECT (es));
+
+ if (es != NULL)
+ gtk_object_unref (GTK_OBJECT (es));
}
g_array_free (efg->shortcuts, TRUE);