sd/source/ui/unoidl/unomodel.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 226706c49484386c87f1b27c58cdfb04699d5e1f Author: Miklos Vajna <[email protected]> AuthorDate: Mon May 19 08:32:59 2025 +0200 Commit: Caolán McNamara <[email protected]> CommitDate: Mon May 19 09:40:12 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/+/185495 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 6eb83feda1b5..f4cba7ea57be 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -3840,6 +3840,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) {
