From 14d96a3061a5a0fe53d6eefb49fdb98af829f9c5 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 7 Dec 2007 11:47:31 +0000 Subject: [PATCH] Avoid warning spew if error == NULL 2007-12-07 Alexander Larsson * glocalfileenumerator.c (_g_local_file_enumerator_new): Avoid warning spew if error == NULL svn path=/trunk/; revision=6065 --- gio/ChangeLog | 5 +++++ gio/glocalfileenumerator.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index c65865d..fc56e56 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,5 +1,10 @@ 2007-12-07 Alexander Larsson + * glocalfileenumerator.c (_g_local_file_enumerator_new): + Avoid warning spew if error == NULL + +2007-12-07 Alexander Larsson + * gfile.c: Update docs wrt etags diff --git a/gio/glocalfileenumerator.c b/gio/glocalfileenumerator.c index 1859d41..8d16a86 100644 --- a/gio/glocalfileenumerator.c +++ b/gio/glocalfileenumerator.c @@ -149,8 +149,11 @@ _g_local_file_enumerator_new (const char *filename, dir = g_dir_open (filename, 0, error != NULL ? &dir_error : NULL); if (dir == NULL) { - convert_file_to_io_error (error, dir_error); - g_error_free (dir_error); + if (error != NULL) + { + convert_file_to_io_error (error, dir_error); + g_error_free (dir_error); + } return NULL; } -- 2.7.4