sd/source/ui/unoidl/unomodel.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e7acfd7dea2f7c905595bd2f0f77201fef078dc3
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Dec 13 08:59:43 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Dec 13 12:15:52 2024 +0100

    cid#1636690 Dereference after null check
    
    Change-Id: Ie32ffbe6148c2e12aa99068790fa7a1a1c0f27e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178400
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index ca5fc33a08f4..ecc7d7c16f07 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -4510,7 +4510,7 @@ OString SdXImpressDocument::getPresentationInfo() const
                             }
 
                             // Notes
-                            SdPage* pNotesPage = 
mpDoc->GetSdPage((pPage->GetPageNum() - 1) >> 1, PageKind::Notes);
+                            SdPage* pNotesPage = pPage ? 
mpDoc->GetSdPage((pPage->GetPageNum() - 1) >> 1, PageKind::Notes) : nullptr;
                             if (pNotesPage)
                             {
                                 SdrObject* pNotes = 
pNotesPage->GetPresObj(PresObjKind::Notes);

Reply via email to