sd/source/ui/view/viewshe2.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 3ff92b8b5c3552f4cdaf3cc6bab33dd2e6053c66 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:35 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/+/198354 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 127f9bc7d324..1d7b28dd7132 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -642,7 +642,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;
