From fe27ab117972b1d98792ee0c78abce0a3c4a0acb Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Sun, 7 May 2000 02:22:08 +0000 Subject: 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 --- shell/e-shortcut.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'shell/e-shortcut.c') 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); -- cgit v1.2.3