From 3459f55d8580a0a7536e92c217321211b54108bc Mon Sep 17 00:00:00 2001 From: Tony Qu Date: Tue, 9 Jan 2024 07:40:58 +0800 Subject: [PATCH] fix #1222 --- ooxml/XWPF/Usermodel/XWPFDocument.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ooxml/XWPF/Usermodel/XWPFDocument.cs b/ooxml/XWPF/Usermodel/XWPFDocument.cs index c1c6977e1..c9fe2e440 100644 --- a/ooxml/XWPF/Usermodel/XWPFDocument.cs +++ b/ooxml/XWPF/Usermodel/XWPFDocument.cs @@ -127,7 +127,7 @@ internal override void OnDocumentRead() } } // Sort out headers and footers - if (doc.Document.body.sectPr != null) + if (doc.Document.body?.sectPr != null) headerFooterPolicy = new XWPFHeaderFooterPolicy(this); // Create for each XML-part in the Package a PartClass