diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-11-21 14:07:08 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-11-21 14:07:08 +0000 |
commit | 5c5023e80bfbe0b9b80d633a0374adc9b4b602dd (patch) | |
tree | fd2f627ffc5274b7bdbf3cb4043e87714612d7fb /poi-ooxml/src | |
parent | 1f50363e472136faffb4fa813ec593278ed740bf (diff) | |
download | poi-5c5023e80bfbe0b9b80d633a0374adc9b4b602dd.tar.gz poi-5c5023e80bfbe0b9b80d633a0374adc9b4b602dd.zip |
set sheet on comments table
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895233 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml/src')
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java index 4b23b9ef63..23b659883f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java @@ -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; } |