coverity#1326465 Dereference null return value

Change-Id: I0bb704e3f49444c7b377ac22acb52cf2dd58325f
This commit is contained in:
Caolán McNamara
2015-10-28 20:54:42 +00:00
parent 0d8f7f69c6
commit 4a0a89f2ee

View File

@@ -45,8 +45,10 @@ public final class XmlUtil {
// clone the starting node
Node clonedNode = cloneNode(docNode, newNode);
// then clone the sub-tree recursively
cloneTree(docNode, clonedNode, newNode);
if (clonedNode != null) {
// then clone the sub-tree recursively
cloneTree(docNode, clonedNode, newNode);
}
return clonedNode;
}
@@ -166,4 +168,4 @@ public final class XmlUtil {
return buffer.toString();
}
}
}