set sheet on comments table

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895233 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-11-21 14:07:08 +00:00
parent 1f50363e47
commit 5c5023e80b
1 changed files with 3 additions and 1 deletions

View File

@ -3524,7 +3524,9 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
sheetComments = (Comments)createRelationship(
XSSFRelation.SHEET_COMMENTS, getWorkbook().getXssfFactory(), -1);
}
sheetComments.setSheet(this);
if (sheetComments != null) {
sheetComments.setSheet(this);
}
}
return sheetComments;
}