mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 16:26:17 +01:00
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:
parent
59cf55a08f
commit
14d96a3061
@ -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>
|
2007-12-07 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
* gfile.c:
|
* gfile.c:
|
||||||
|
@ -148,9 +148,12 @@ _g_local_file_enumerator_new (const char *filename,
|
|||||||
dir_error = NULL;
|
dir_error = NULL;
|
||||||
dir = g_dir_open (filename, 0, error != NULL ? &dir_error : NULL);
|
dir = g_dir_open (filename, 0, error != NULL ? &dir_error : NULL);
|
||||||
if (dir == NULL)
|
if (dir == NULL)
|
||||||
|
{
|
||||||
|
if (error != NULL)
|
||||||
{
|
{
|
||||||
convert_file_to_io_error (error, dir_error);
|
convert_file_to_io_error (error, dir_error);
|
||||||
g_error_free (dir_error);
|
g_error_free (dir_error);
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user