Commit 62df0562 authored by Caleb Michael Moore's avatar Caleb Michael Moore

fixed gradient inherit by href bug opened uup recently

parent a9bf4698
......@@ -109,9 +109,13 @@ rsvg_defs_lookup (const RsvgDefs *defs, const char *name)
char * hashpos;
hashpos = g_strrstr (name, "#");
if (!hashpos)
return NULL;
{
return NULL;
}
if (hashpos == name)
return (RsvgDefVal *)g_hash_table_lookup (defs->hash, name+1);
{
return (RsvgDefVal *)g_hash_table_lookup (defs->hash, name+1);
}
else
{
gchar ** splitbits;
......
......@@ -504,7 +504,7 @@ rsvg_start_linear_gradient (RsvgHandle *ctx, RsvgPropertyBag *atts)
if (xlink_href != NULL)
{
RsvgLinearGradient * parent = (RsvgLinearGradient*)rsvg_defs_lookup (ctx->defs, xlink_href+1);
RsvgLinearGradient * parent = (RsvgLinearGradient*)rsvg_defs_lookup (ctx->defs, xlink_href);
if (parent != NULL)
{
cloned = TRUE;
......@@ -649,7 +649,7 @@ rsvg_start_radial_gradient (RsvgHandle *ctx, RsvgPropertyBag *atts, const char *
if (xlink_href != NULL)
{
RsvgRadialGradient * parent = (RsvgRadialGradient*)rsvg_defs_lookup (ctx->defs, xlink_href+1);
RsvgRadialGradient * parent = (RsvgRadialGradient*)rsvg_defs_lookup (ctx->defs, xlink_href);
if (parent != NULL)
{
cloned = TRUE;
......@@ -809,7 +809,7 @@ rsvg_start_pattern (RsvgHandle *ctx, RsvgPropertyBag *atts)
if (xlink_href != NULL)
{
RsvgPattern * parent = (RsvgPattern*)rsvg_defs_lookup (ctx->defs, xlink_href+1);
RsvgPattern * parent = (RsvgPattern*)rsvg_defs_lookup (ctx->defs, xlink_href);
if (parent != NULL)
{
cloned = TRUE;
......
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