mirror of https://github.com/GNOME/gimp.git
(svg_parser_end_element): don't crash on empty gradient definitions.
This commit is contained in:
parent
df0bf0185b
commit
f0da0e438c
|
@ -2,6 +2,7 @@
|
|||
|
||||
* app/core/gimpgradient-load.c (gimp_gradient_load_svg): improved
|
||||
error message.
|
||||
(svg_parser_end_element): don't crash on empty gradient definitions.
|
||||
|
||||
2004-07-23 Sven Neumann <sven@gimp.org>
|
||||
|
||||
|
|
|
@ -364,7 +364,8 @@ svg_parser_end_element (GMarkupParseContext *context,
|
|||
{
|
||||
parser->state = SVG_STATE_OUT;
|
||||
}
|
||||
else if (parser->gradient && strcmp (element_name, "linearGradient") == 0)
|
||||
else if (parser->gradient && parser->stops &&
|
||||
strcmp (element_name, "linearGradient") == 0)
|
||||
{
|
||||
GimpGradientSegment *seg = gimp_gradient_segment_new ();
|
||||
GimpGradientSegment *next = NULL;
|
||||
|
|
Loading…
Reference in New Issue