Commit fe005f3a authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

fixed bug added when factoring out gimp_edit_extract(): check if

2004-03-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.c (gimp_edit_extract): fixed bug added when
	factoring out gimp_edit_extract(): check if tile_manager_crop()
	cropped away the whole TileManager before making a GimpBuffer from
	it.
parent 9c97ba1b
2004-03-07 Michael Natterer <mitch@gimp.org>
* app/core/gimp-edit.c (gimp_edit_extract): fixed bug added when
factoring out gimp_edit_extract(): check if tile_manager_crop()
cropped away the whole TileManager before making a GimpBuffer from
it.
2004-03-07 Sven Neumann <sven@gimp.org>
* gimp.spec.in: removed references to static libraries. These
......@@ -327,23 +327,22 @@ gimp_edit_extract (GimpImage *gimage,
if (cut_pixels)
gimp_image_undo_group_end (gimage);
if (tiles)
/* Only crop if the gimage mask wasn't empty */
if (tiles && ! empty)
{
GimpBuffer *buffer;
TileManager *crop = tile_manager_crop (tiles, 0);
/* Only crop if the gimage mask wasn't empty */
if (! empty)
if (crop != tiles)
{
TileManager *crop = tile_manager_crop (tiles, 0);
if (crop != tiles)
{
tile_manager_unref (tiles);
tiles = crop;
}
tile_manager_unref (tiles);
tiles = crop;
}
}
if (tiles)
{
GimpBuffer *buffer = gimp_buffer_new (tiles, "Global Buffer", FALSE);
buffer = gimp_buffer_new (tiles, "Global Buffer", FALSE);
gimp_set_global_buffer (gimage->gimp, buffer);
g_object_unref (buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment