From 7ea57f5c80dfc38cb2ff5044c4715d9a770c9d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aurimas=20Ju=C5=A1ka?= Date: Sun, 13 Jul 2008 16:27:58 +0000 Subject: [PATCH] check for NULL pointer to prevent crash when there are no filenames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-07-13 Aurimas Juška * 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 --- ChangeLog | 5 +++++ app/unique.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c6095b10f0..164335f550 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-13 Aurimas Juška + + * 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 * app/display/gimpdisplayshell.c (gimp_display_shell_new): Get rid diff --git a/app/unique.c b/app/unique.c index b31318cb93..2819c00c9d 100644 --- a/app/unique.c +++ b/app/unique.c @@ -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);