]> source.dussan.org Git - poi.git/commitdiff
set sheet on comments table
authorPJ Fanning <fanningpj@apache.org>
Sun, 21 Nov 2021 14:07:08 +0000 (14:07 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sun, 21 Nov 2021 14:07:08 +0000 (14:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895233 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

index 4b23b9ef633961b66e86cc8e818e6d55d60196a8..23b659883f3ac7bed82fd53c47cccdf948b36202 100644 (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;
     }