Null reference exception saving to PDF in 24.6.0

Saving to PDF in 24.6.0 is throwing a null reference exception in 24.6.0 for some documents. They work fine in 24.5.0.

System.NullReferenceException: Object reference not set to an instance of an object.
   at AUc.v()
   at AUc.d(Document d)
   at JUY.d(Paragraph d)
   at JUY.d(Node d)
   at WU7.T()
   at WU7.M()
   at WU7.b()
   at WU7.MoveNext()
   at kUZ.c()
   at Aspose.Words.Document.UpdatePageLayout()
   at Aspose.Words.Document.d(Boolean d)
   at Aspose.Words.Document.z()
   at Aspose.Words.Document.get_PageCount()
   at sUz.v(rCK d, Fd v)
   at sUz.eUciFd(rCK d)
   at NUQ.NUQiFd(rCK d)
   at Aspose.Words.Document.d(rCK d)
   at Aspose.Words.Document.d(Stream d, String v, SaveOptions c)
   at Aspose.Words.Document.Save(Stream stream, SaveOptions saveOptions)
var doc = new Document(Stream);
var pdfStream = new MemoryStream();
var saveOptions = SaveOptions.CreateSaveOptions(SaveFormat.Pdf);
saveOptions.MemoryOptimization = true;
doc.Save(pdfStream, saveOptions);

null-reference-in-26.docx (22.0 KB)

@DeanEq
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-27124

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-27124) have been fixed in this Aspose.Words for .NET 24.7 update also available on NuGet.