Avoid warning spew if error == NULL

2007-12-07  Alexander Larsson  <alexl@redhat.com>

	* glocalfileenumerator.c (_g_local_file_enumerator_new):
	Avoid warning spew if error == NULL


svn path=/trunk/; revision=6065
This commit is contained in:
Alexander Larsson 2007-12-07 11:47:31 +00:00 committed by Alexander Larsson
parent 59cf55a08f
commit 14d96a3061
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2007-12-07 Alexander Larsson <alexl@redhat.com>
* glocalfileenumerator.c (_g_local_file_enumerator_new):
Avoid warning spew if error == NULL
2007-12-07 Alexander Larsson <alexl@redhat.com>
* gfile.c:

View File

@ -148,9 +148,12 @@ _g_local_file_enumerator_new (const char *filename,
dir_error = NULL;
dir = g_dir_open (filename, 0, error != NULL ? &dir_error : NULL);
if (dir == NULL)
{
if (error != NULL)
{
convert_file_to_io_error (error, dir_error);
g_error_free (dir_error);
}
return NULL;
}