don't add documents w/o a name to the list. Fixes bug #159510.

2004-11-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdocumentlist.c (gimp_document_list_deserialize):
	don't add documents w/o a name to the list. Fixes bug #159510.

	* app/core/gimpdrawable.c (gimp_drawable_resize): extended the
	check to take the offsets into account as well.
This commit is contained in:
Sven Neumann
2004-11-26 14:45:10 +00:00
committed by Sven Neumann
parent 03eae14008
commit 3e56a07190
3 changed files with 23 additions and 8 deletions

View File

@ -140,8 +140,7 @@ gimp_document_list_deserialize (GimpConfig *config,
token = G_TOKEN_RIGHT_PAREN;
if (scanner->value.v_symbol == document_symbol)
{
gchar *uri;
GimpImagefile *imagefile;
gchar *uri = NULL;
if (! gimp_scanner_parse_string (scanner, &uri))
{
@ -149,14 +148,19 @@ gimp_document_list_deserialize (GimpConfig *config,
break;
}
imagefile = gimp_imagefile_new (document_list->gimp, uri);
if (uri)
{
GimpImagefile *imagefile;
g_free (uri);
imagefile = gimp_imagefile_new (document_list->gimp, uri);
gimp_container_add (GIMP_CONTAINER (document_list),
GIMP_OBJECT (imagefile));
g_free (uri);
g_object_unref (imagefile);
gimp_container_add (GIMP_CONTAINER (document_list),
GIMP_OBJECT (imagefile));
g_object_unref (imagefile);
}
}
break;