Skip to content

Commit

Permalink
PDFBOX-5649: avoid NPE
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1911616 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Aug 12, 2023
1 parent 62bba0e commit e12e5ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit e12e5ff

Please sign in to comment.