ubsan: call on null pointer in CppunitTest_sd_uiimpress

probably after
  commit 829544185d
  Author: Mohit Marathe <mohit.marathe@collabora.com>
  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 <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2026-01-29 08:44:20 +01:00
parent 7c6ebdfb0a
commit e61af384e0
+2 -1
View File
@@ -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;