aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcut.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-05-07 10:22:08 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-05-07 10:22:08 +0800
commitfe27ab117972b1d98792ee0c78abce0a3c4a0acb (patch)
treee62ce3cab9a074917276ffb2ab3ee91e56deb11d /shell/e-shortcut.c
parent3219faad0c583cf44add809ded9183ccc9c4f302 (diff)
downloadgsoc2013-evolution-fe27ab117972b1d98792ee0c78abce0a3c4a0acb.tar.gz
gsoc2013-evolution-fe27ab117972b1d98792ee0c78abce0a3c4a0acb.tar.zst
gsoc2013-evolution-fe27ab117972b1d98792ee0c78abce0a3c4a0acb.zip
Portability fix (use `readdir()', not `readdir_r()'). Also, be safer
about NULL objects when destroying the shell or the shortcuts. svn path=/trunk/; revision=2850
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);