diff --git a/source/net/filebot/util/XPathUtilities.java b/source/net/filebot/util/XPathUtilities.java index 7b785204..e4b40fc7 100644 --- a/source/net/filebot/util/XPathUtilities.java +++ b/source/net/filebot/util/XPathUtilities.java @@ -58,9 +58,11 @@ public final class XPathUtilities { public static List getChildren(String nodeName, Node parentNode) { List children = new ArrayList(); - for (Node child : new NodeListDecorator(parentNode.getChildNodes())) { - if (nodeName.equals(child.getNodeName())) - children.add(child); + if (parentNode != null) { + for (Node child : new NodeListDecorator(parentNode.getChildNodes())) { + if (nodeName.equals(child.getNodeName())) + children.add(child); + } } return children;