summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine
diff options
context:
space:
mode:
Diffstat (limited to 'org/madore/damlengine')
-rw-r--r--org/madore/damlengine/TodoImgAElement.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org/madore/damlengine/TodoImgAElement.java b/org/madore/damlengine/TodoImgAElement.java
index aa545bc..0d8edf6 100644
--- a/org/madore/damlengine/TodoImgAElement.java
+++ b/org/madore/damlengine/TodoImgAElement.java
@@ -26,7 +26,11 @@ public final class TodoImgAElement extends TodoDefaultElement {
Element a = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "a");
if ( explicitLang != null )
LangHelper.setLangNorec(node, explicitLang);
- node.getParentNode().replaceChild(a, node);
+ Node pnode = node.getParentNode();
+ if ( pnode == null )
+ // See "FIXME" in TodoCutHere.java (node may have moved out of DOM).
+ return;
+ pnode.replaceChild(a, node);
Element img = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "img");
a.appendChild(img);
ArrayList<Attr> attrList = getAttrList(this.node);