Bug 724295 - multiple svg gradients in a single file not listed correctly

Clear the parsed lis of stops after each gradient, or they will all
look the same.
This commit is contained in:
Michael Natterer 2014-02-13 22:06:12 +01:00
parent a059c0e7eb
commit 3e618320d3
1 changed files with 8 additions and 0 deletions

View File

@ -423,8 +423,16 @@ svg_parser_end_element (GMarkupParseContext *context,
if (parser->gradient &&
strcmp (element_name, "linearGradient") == 0)
{
GList *list;
parser->gradient->segments = svg_parser_gradient_segments (parser->stops);
for (list = parser->stops; list; list = list->next)
g_slice_free (SvgStop, list->data);
g_list_free (parser->stops);
parser->stops = NULL;
if (parser->gradient->segments)
parser->gradients = g_list_prepend (parser->gradients,
parser->gradient);