Skip to content

Commit

Permalink
Fix NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Feb 23, 2024
1 parent a2090ab commit 67a6cb9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public String getstructParentType() {
PDNumberTreeNode parentTreeRoot = structTreeRoot.getParentTree();
COSBase structureElement = null;
try {
PDParentTreeValue treeValue = (PDParentTreeValue)parentTreeRoot.getValue(structParent);
PDParentTreeValue treeValue = parentTreeRoot != null ? (PDParentTreeValue)parentTreeRoot.getValue(structParent) : null;
if (treeValue != null) {
structureElement = treeValue.getCOSObject();
}
Expand Down

0 comments on commit 67a6cb9

Please sign in to comment.