gimp r24704 - in trunk: . app/widgets



Author: neo
Date: Fri Jan 25 07:39:33 2008
New Revision: 24704
URL: http://svn.gnome.org/viewvc/gimp?rev=24704&view=rev

Log:
2008-01-25  Sven Neumann  <sven gimp org>

	* app/widgets/gimpcolormapeditor.c (gimp_colormap_editor_draw):
	avoid crashing when the widget allocation is small (bug 
#511926).



Modified:
   trunk/ChangeLog
   trunk/app/widgets/gimpcolormapeditor.c

Modified: trunk/app/widgets/gimpcolormapeditor.c
==============================================================================
--- trunk/app/widgets/gimpcolormapeditor.c	(original)
+++ trunk/app/widgets/gimpcolormapeditor.c	Fri Jan 25 07:39:33 2008
@@ -504,7 +504,8 @@
               row[(j * cellsize + k) * 3 + b] = image->colormap[col * 3 + b];
         }
 
-      memset (row + j * cellsize * 3, 255, 3 * (width - j * cellsize));
+      if (j * cellsize > width)
+        memset (row + j * cellsize * 3, 255, 3 * (width - j * cellsize));
 
       for (k = 0; k < cellsize; k++)
         {



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