diff --git a/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java b/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java index 1cb29489fa0..324d05b1298 100644 --- a/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java +++ b/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java @@ -605,6 +605,11 @@ private AbstractStructuredType parseLiDescription(XMPMetadata xmp, QName descrip // Instantiate abstract structured type with hint from first element Element first = elements.get(0); PropertyType ctype = checkPropertyDefinition(xmp, DomHelper.getQName(first)); + if (ctype == null) + { + throw new XmpParsingException(ErrorType.NoType, "ctype is null, first: " + first + + ", DomHelper.getQName(first): " + DomHelper.getQName(first)); + } Types tt = ctype.type(); AbstractStructuredType ast = instanciateStructured(tm, tt, descriptor.getLocalPart(), first.getNamespaceURI());