Commit 96e8524c authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Lars-Peter Clausen

Don't crash if the index of the last segment is out of range.

2008-08-23  Lars-Peter Clausen  <lars@metafoo.de>

	* 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.


svn path=/trunk/; revision=26723
parent ebea1b5a
2008-08-23 Lars-Peter Clausen <lars@metafoo.de>
* 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.
2008-08-23 Sven Neumann <sven@gimp.org>
* plug-ins/twain/Makefile.am: dropped use of AM_LDFLAGS completely
......
......@@ -1304,7 +1304,10 @@ gradient_segment_range_blend_colors_invoker (GimpProcedure *procedure,
if (start_seg)
{
gimp_gradient_segment_range_blend (gradient,
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,
&end_seg->right_color,
......@@ -1346,6 +1349,9 @@ gradient_segment_range_blend_opacity_invoker (GimpProcedure *procedure,
if (start_seg)
{
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,
......
......@@ -1252,7 +1252,10 @@ HELP
if (start_seg)
{
gimp_gradient_segment_range_blend (gradient,
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,
&end_seg->right_color,
......@@ -1298,6 +1301,9 @@ HELP
if (start_seg)
{
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,
......
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