You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Bogdan <bo...@op.pl> on 2008/08/03 10:55:52 UTC
Batik code correction
Hello.
You may have not received my message, so I send again:
SVGSVGElementBridge.java:handleAnimatedAttributeChanged(AnimatedLiveAttributeValue):
Locate
if (rebuild) {
CompositeGraphicsNode gn = node.getParent();
gn.remove(node);
disposeTree(e, false);
handleElementAdded(gn, e.getParentNode(), e);
return;
}
(near the middle of the file)
and replace
gn.remove(node);
with
if (gn != null) gn.remove(node);
and
handleElementAdded(gn, e.getParentNode(), e);
with
if (gn != null) handleElementAdded(gn, e.getParentNode(), e);
This corrections avoids some null-pointer exceptions inside batik.
--
Pozdrawiam/Regards - Bogdan (GNU/Linux & FreeDOS)
Kurs asemblera x86 (DOS, GNU/Linux):http://rudy.mif.pg.gda.pl/~bogdro
Grupy dyskusyjne o asm: pl.comp.lang.asm alt.pl.asm alt.pl.asm.win32
www.JabberPL.org www.TorProject.org Soft (EN): miniurl.pl/bogdro-soft
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
Re: Batik code correction
Posted by Helder Magalhães <he...@gmail.com>.
> and replace
> gn.remove(node);
> with
> if (gn != null) gn.remove(node);
[...]
> This corrections avoids some null-pointer exceptions inside batik.
This doesn't seem to be a bug within the framework but (potentially) a
threading issue within your code. Please consider following the
thread-safe guidelines [1] (if you aren't already, of course).
Hope this helps,
Helder Magalhães
[1] http://xmlgraphics.apache.org/batik/using/scripting/java.html#Threads
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org