sd/source/ui/unoidl/unomodel.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit e3a977bfa32bbef6f965e923f55c850a372e649e Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon May 19 08:32:59 2025 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue May 20 09:35:34 2025 +0200 sd: fix crash in SdXImpressDocument::GetViewShell() Crashreport: > SIG Fatal signal received: SIGSEGV code: 128 for address: 0x0 > > program/libsdlo.so > SdXImpressDocument::GetViewShell() > sd/source/ui/unoidl/unomodel.cxx:3844 (discriminator 1) > program/libsdlo.so > SdXImpressDocument::getViewRenderState(SfxViewShell*) > sd/source/ui/unoidl/unomodel.cxx:3957 > program/libmergedlo.so > doc_getCommandValues > desktop/source/lib/init.cxx:6760 Change-Id: I92d2f11b98709145f377a8dc0e469d6fe17ec9ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185507 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins (cherry picked from commit 96c28cf36c8d221c2d2fa50c320690a48f311ba7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185550 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 4c5fe32caf70..532195433da4 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -3593,6 +3593,11 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r DrawViewShell* SdXImpressDocument::GetViewShell() { + if (!mpDocShell) + { + return nullptr; + } + DrawViewShell* pViewSh = dynamic_cast<DrawViewShell*>(mpDocShell->GetViewShell()); if (!pViewSh) {