app/pdb/display_cmds.c the first display takes ownership of the image.

2002-10-24  Sven Neumann  <sven@gimp.org>

	* app/pdb/display_cmds.c
	* tools/pdbgen/pdb/display.pdb (display_new_invoker): the first
	display takes ownership of the image. Fixes bug #94371.
This commit is contained in:
Sven Neumann 2002-10-24 13:06:03 +00:00 committed by Sven Neumann
parent cf9095063a
commit 18497f40da
3 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2002-10-24 Sven Neumann <sven@gimp.org>
* app/pdb/display_cmds.c
* tools/pdbgen/pdb/display.pdb (display_new_invoker): the first
display takes ownership of the image. Fixes bug #94371.
2002-10-24 Sven Neumann <sven@gimp.org>
* plug-ins/common/compose.c

View file

@ -64,6 +64,10 @@ display_new_invoker (Gimp *gimp,
gdisp = (GimpDisplay *) gimp_create_display (gimp, gimage, 0x0101);
success = (gdisp != NULL);
/* the first display takes ownership of the image */
if (success && gimage->disp_count == 1)
g_object_unref (gimage);
}
return_args = procedural_db_return_args (&display_new_proc, success);

View file

@ -45,6 +45,10 @@ HELP
gdisp = (GimpDisplay *) gimp_create_display (gimp, gimage, 0x0101);
success = (gdisp != NULL);
/* the first display takes ownership of the image */
if (success && gimage->disp_count == 1)
g_object_unref (gimage);
}
CODE
);