sd/source/ui/view/viewshe2.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9604d0d0e9419d068918117742c2e0248c6c978b
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Jan 29 08:12:30 2026 +0200
Commit:     Mohit Marathe <[email protected]>
CommitDate: Thu Jan 29 14:53:53 2026 +0100

    ubsan: call on null pointer in CppunitTest_sd_uiimpress
    
    probably after
      commit 829544185d6dbfaaca95c9e88eab7ec57d3c518d
      Author: Mohit Marathe <[email protected]>
      Date:   Mon Nov 3 16:39:05 2025 +0530
      sd: remember canvas page zoom
    
    [_RUN_____] testTdf129346::TestBody
    /sd/source/ui/view/viewshe2.cxx:647:27: runtime error: member call on null 
pointer of type 'SdPage'
    in sd::ViewShell::RememberPageZoom(unsigned short) 
/sd/source/ui/view/viewshe2.cxx:647:27
    in sd::ViewShell::SetZoom(long) /sd/source/ui/view/viewshe2.cxx:408:5
    in sd::NotesPanelViewShell::SetZoom(long) 
/sd/source/ui/view/NotesPanelViewShell.cxx:369:16
    in sd::NotesPanelViewShell::Construct() 
/sd/source/ui/view/NotesPanelViewShell.cxx:158:5
    
    Change-Id: If2b61f5a51d069b27ec84c1a4b859ba7a2c442a8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198333
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>
    (cherry picked from commit e61af384e0fe7e9a9f32dd5a7f5830b430b23e78)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198355
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Mohit Marathe <[email protected]>

diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index aeee29008f2b..7f74dbd8bcc6 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -644,7 +644,8 @@ sal_uInt16 ViewShell::GetPageZoom() const
 
 void ViewShell::RememberPageZoom(const sal_uInt16 nZoom)
 {
-    if (getCurrentPage()->IsCanvasPage())
+    SdPage* pPage = getCurrentPage();
+    if (pPage && pPage->IsCanvasPage())
         mnCanvasPageZoom = nZoom;
     else
         mnNonCanvasPageZoom = nZoom;

Reply via email to