sd/source/ui/view/DocumentRenderer.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 9a406c26e8b8d09b99c949192bc731ba6126cef0
Author:     Xisco Fauli <[email protected]>
AuthorDate: Thu Oct 23 10:34:40 2025 +0200
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Oct 23 11:58:45 2025 +0200

    tdf#169015: GetOutlinerParaObject might return nullptr
    
    Regression from
    commit 43e511e642a2ce7026b30ea5c212940ff3eb522e
    Author: Tibor Nagy <[email protected]>
    Date:   Fri Nov 29 02:10:21 2024 +0100
    
        tdf#88226 sd: fix cutting off the overflow text on the notes print page
    
    Change-Id: I4e25760afe4bd535d1accf8291f9cbb4457625ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192895
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins
    Tested-by: Caolán McNamara <[email protected]>

diff --git a/sd/source/ui/view/DocumentRenderer.cxx 
b/sd/source/ui/view/DocumentRenderer.cxx
index eca3a27bc3ef..324467b32b78 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -889,7 +889,8 @@ namespace {
                 pOut->SetPaperSize(aNotesSize);
                 pOut->SetUpdateLayout(true);
                 pOut->Clear();
-                pOut->SetText(*pNotesObj->GetOutlinerParaObject());
+                if (OutlinerParaObject* pOutlinerParaObject = 
pNotesObj->GetOutlinerParaObject())
+                    pOut->SetText(*pOutlinerParaObject);
 
                 bool bAutoGrow = 
pNotesObj->GetMergedItem(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
 
@@ -2523,7 +2524,8 @@ private:
                     pOut->SetPaperSize(nNotesObjSize);
                     pOut->SetUpdateLayout(true);
                     pOut->Clear();
-                    pOut->SetText(*pNotesObj->GetOutlinerParaObject());
+                    if (OutlinerParaObject* pOutlinerParaObject = 
pNotesObj->GetOutlinerParaObject())
+                        pOut->SetText(*pOutlinerParaObject);
 
                     sal_Int32 nFirstPageBottomMargin = 0;
                     ::tools::Long nNotesHeight = nNotesObjSize.Height();

Reply via email to