check for NULL pointer to prevent crash when there are no filenames

2008-07-13  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/unique.c (gimp_unique_win32_open): check for NULL pointer to
	prevent crash when there are no filenames provided.


svn path=/trunk/; revision=26179
This commit is contained in:
Aurimas Juška 2008-07-13 16:27:58 +00:00 committed by Aurimas Juška
parent fe0d07de9f
commit 7ea57f5c80
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2008-07-13 Aurimas Juška <aurisj@svn.gnome.org>
* app/unique.c (gimp_unique_win32_open): check for NULL pointer to
prevent crash when there are no filenames provided.
2008-07-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_new): Get rid

View file

@ -193,7 +193,7 @@ gimp_unique_win32_open (const gchar **filenames,
GError *error = NULL;
gint i;
for (i = 0; filenames[i]; i++)
for (i = 0; filenames && filenames[i]; i++)
{
gchar *uri = gimp_unique_filename_to_uri (filenames[i], cwd, &error);