don't allow NULL URIs in the history list

svn path=/trunk/; revision=23256
This commit is contained in:
Sven Neumann 2007-08-14 16:36:57 +00:00
parent dd7c014e09
commit e2c32bb452
1 changed files with 3 additions and 5 deletions

View File

@ -332,6 +332,8 @@ _gimp_color_profile_store_history_add (GimpColorProfileStore *store,
}
}
if (! uri)
return FALSE;
if (label && *label)
{
@ -339,7 +341,7 @@ _gimp_color_profile_store_history_add (GimpColorProfileStore *store,
uri, label,
++max);
}
else if (uri)
else
{
gchar *filename = g_filename_from_uri (uri, NULL, NULL);
gchar *basename = g_filename_display_basename (filename);
@ -350,10 +352,6 @@ _gimp_color_profile_store_history_add (GimpColorProfileStore *store,
g_free (basename);
g_free (filename);
}
else
{
return FALSE;
}
return iter_valid;
}