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

New commits:
commit d8d4320a6420ea623f613203cc508a90e8d3c494
Author:     Xisco Fauli <[email protected]>
AuthorDate: Thu Oct 23 10:34:40 2025 +0200
Commit:     Adolfo Jayme Barrientos <[email protected]>
CommitDate: Thu Oct 23 20:21:26 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]>
    (cherry picked from commit 9a406c26e8b8d09b99c949192bc731ba6126cef0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192898
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/sd/source/ui/view/DocumentRenderer.cxx 
b/sd/source/ui/view/DocumentRenderer.cxx
index 53b9737f5e8b..a7835759ad61 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