Commit b580628e authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

don't leak empty SVG gradients.

2004-07-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgradient-load.c: don't leak empty SVG gradients.
parent cc8df78c
2004-07-27 Sven Neumann <sven@gimp.org>
* app/core/gimpgradient-load.c: don't leak empty SVG gradients.
2004-07-27 Sven Neumann <sven@gimp.org>
* app/actions/image-commands.c: include "libgimpbase/gimpbase.h",
......
......@@ -34,6 +34,8 @@ Overview of Changes in GIMP 2.1.3
- Renamed GimpColor boxed type to GimpRGB and moved it to libgimpcolor.
- Moved GIMP_TYPE_UNIT and GIMP_TYPE_MEMSIZE to libgimpbase.
- Fixes to the BMP loader plug-in (bug #143682).
- Fixes to the Decompose plug-in (bug #147603).
......
......@@ -334,7 +334,6 @@ svg_parser_end_element (GMarkupParseContext *context,
SvgParser *parser = user_data;
if (parser->gradient &&
parser->stops &&
strcmp (element_name, "linearGradient") == 0)
{
parser->gradient->segments = svg_parser_gradient_segments (parser->stops);
......@@ -352,10 +351,17 @@ svg_parser_end_element (GMarkupParseContext *context,
static GimpGradientSegment *
svg_parser_gradient_segments (GList *stops)
{
GimpGradientSegment *segment = gimp_gradient_segment_new ();
SvgStop *stop = stops->data;
GimpGradientSegment *segment;
SvgStop *stop;
GList *list;
if (! stops)
return NULL;
stop = stops->data;
segment = gimp_gradient_segment_new ();
segment->left_color = stop->color;
segment->right_color = stop->color;
......
Supports Markdown
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