gimp r27833 - in branches/gimp-2-6: . app/core



Author: neo
Date: Sat Dec 27 15:15:18 2008
New Revision: 27833
URL: http://svn.gnome.org/viewvc/gimp?rev=27833&view=rev

Log:
2008-12-27  Sven Neumann  <sven gimp org>

	Merged from trunk:

	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.



Modified:
   branches/gimp-2-6/ChangeLog
   branches/gimp-2-6/app/core/gimpdrawable-shadow.c

Modified: branches/gimp-2-6/app/core/gimpdrawable-shadow.c
==============================================================================
--- branches/gimp-2-6/app/core/gimpdrawable-shadow.c	(original)
+++ branches/gimp-2-6/app/core/gimpdrawable-shadow.c	Sat Dec 27 15:15:18 2008
@@ -89,14 +89,16 @@
    */
   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, x, y);
+
+      tile_manager_unref (tiles);
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]