gimp r26726 - in branches/gimp-2-4: . app/pdb tools/pdbgen/pdb



Author: larsc
Date: Sat Aug 23 13:33:39 2008
New Revision: 26726
URL: http://svn.gnome.org/viewvc/gimp?rev=26726&view=rev

Log:
2008-08-23  Lars-Peter Clausen  <lars metafoo de>

	Merged from trunk:
	
	* tools/pdbgen/pdb/gradient.pdb
	(gimp_gradient_segment_range_blend_(colors|opacity)): Don't crash 
	if the index of the last segment is out of range.

	* app/pdb/gradient-cmds.c: regenerated.



Modified:
   branches/gimp-2-4/ChangeLog
   branches/gimp-2-4/app/pdb/gradient_cmds.c
   branches/gimp-2-4/tools/pdbgen/pdb/gradient.pdb

Modified: branches/gimp-2-4/app/pdb/gradient_cmds.c
==============================================================================
--- branches/gimp-2-4/app/pdb/gradient_cmds.c	(original)
+++ branches/gimp-2-4/app/pdb/gradient_cmds.c	Sat Aug 23 13:33:39 2008
@@ -1226,6 +1226,9 @@
 
       if (start_seg && GIMP_DATA (gradient)->writable)
         {
+          if (!end_seg)
+            end_seg = gimp_gradient_segment_get_last (start_seg);
+
           gimp_gradient_segment_range_blend (gradient,
                                              start_seg, end_seg,
                                              &start_seg->left_color,
@@ -1266,6 +1269,9 @@
 
       if (start_seg && GIMP_DATA (gradient)->writable)
         {
+          if (!end_seg)
+            end_seg = gimp_gradient_segment_get_last (start_seg);
+
           gimp_gradient_segment_range_blend (gradient,
                                              start_seg, end_seg,
                                              &start_seg->left_color,

Modified: branches/gimp-2-4/tools/pdbgen/pdb/gradient.pdb
==============================================================================
--- branches/gimp-2-4/tools/pdbgen/pdb/gradient.pdb	(original)
+++ branches/gimp-2-4/tools/pdbgen/pdb/gradient.pdb	Sat Aug 23 13:33:39 2008
@@ -1227,6 +1227,9 @@
 
   if (start_seg && GIMP_DATA (gradient)->writable)
     {
+      if (!end_seg)
+        end_seg = gimp_gradient_segment_get_last (start_seg);
+
       gimp_gradient_segment_range_blend (gradient,
                                          start_seg, end_seg,
                                          &start_seg->left_color,
@@ -1273,6 +1276,9 @@
 
   if (start_seg && GIMP_DATA (gradient)->writable)
     {
+      if (!end_seg)
+        end_seg = gimp_gradient_segment_get_last (start_seg);
+
       gimp_gradient_segment_range_blend (gradient,
                                          start_seg, end_seg,
                                          &start_seg->left_color,



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