Skip to content

Commit

Permalink
FIX: Don't parse check missing entries
Browse files Browse the repository at this point in the history
- check that an XML document in the manifest exists before grabbing the parse entry.
  • Loading branch information
carlwilson committed Nov 1, 2024
1 parent abae6dd commit 02a753f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,12 @@ public ParseResult getEntryXmlParseResult(final String path) {
}
Path parent = filePath.getParent();
OdfPackageDocument doc = this.documentMap.get((parent == null) ? "/" : parent.toString());
return (doc == null) ? null
: doc.getXmlDocument(filePath.getFileName().toString())
.getParseResult();
if (doc == null) {
return null;
}
OdfXmlDocument xmlDoc = doc.getXmlDocument(filePath.getFileName().toString());
return (xmlDoc == null) ? null
: xmlDoc.getParseResult();
}

@Override
Expand Down

0 comments on commit 02a753f

Please sign in to comment.