Commit 4409f385 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

Bug 564593 – crash when the drawable is changed while a color tools is

2008-12-27  Sven Neumann  <sven@gimp.org>

	Bug 564593 – crash when the drawable is changed while a color
	tools is active

	* app/core/gimpdrawable-shadow.c 
(gimp_drawable_merge_shadow_tiles):
	keep a reference to the shadow tiles because it might otherwise 
be
	free'd under our feet.


svn path=/trunk/; revision=27832
parent d86d0856
2008-12-27 Sven Neumann <sven@gimp.org>
Bug 564593 crash when the drawable is changed while a color
tools is active
* app/core/gimpdrawable-shadow.c (gimp_drawable_merge_shadow_tiles):
keep a reference to the shadow tiles because it might otherwise be
free'd under our feet.
2008-12-26 Sven Neumann <sven@gimp.org>
* plug-ins/common/file-gbr.c: let the save procedure accept a
......
......@@ -89,14 +89,16 @@ gimp_drawable_merge_shadow_tiles (GimpDrawable *drawable,
*/
if (gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
{
PixelRegion shadowPR;
TileManager *tiles = tile_manager_ref (drawable->shadow);
PixelRegion shadowPR;
pixel_region_init (&shadowPR, drawable->shadow,
x, y, width, height, FALSE);
pixel_region_init (&shadowPR, tiles, x, y, width, height, FALSE);
gimp_drawable_apply_region (drawable, &shadowPR,
push_undo, undo_desc,
GIMP_OPACITY_OPAQUE, GIMP_REPLACE_MODE,
NULL, NULL, x, y);
tile_manager_unref (tiles);
}
}
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