summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-10-18 01:32:08 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2024-10-18 10:32:20 +0200
commitb4d36ba6e813d4fffadf277572d6e543dff7c827 (patch)
treecc817017d1db844bbe083450cd8f338e5a4b5ff5 /sd
parent1c9ef56790a6abc8475fa817f5ea4d288480c76f (diff)
tdf#163486: PVS: check mpViewSh
V595 The 'mpViewSh' pointer was utilized before it was verified against nullptr. Check lines: 704, 713. Change-Id: I5c1902d9aa9a33e62cf2aa559bab9c0b3f45f688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175112 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit eeca3ea10109aeea45d7da279c05ef278d4e2cd0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175056 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/sdview.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index cfa0fa909f5a..0cb038aa8ba1 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -700,10 +700,13 @@ bool View::SdrBeginTextEdit(
pOutl->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() );
}
- // check if we have IASS active and propagate that info to the view with the active TextEdit
- rtl::Reference< SlideShow > xSlideshow(SlideShow::GetSlideShow(mpViewSh->GetViewShellBase()));
- const bool bIASS(xSlideshow.is() && xSlideshow->isRunning() && xSlideshow->IsInteractiveSlideshow());
- setInteractiveSlideShow(bIASS);
+ if (mpViewSh)
+ {
+ // check if we have IASS active and propagate that info to the view with the active TextEdit
+ rtl::Reference< SlideShow > xSlideshow(SlideShow::GetSlideShow(mpViewSh->GetViewShellBase()));
+ const bool bIASS(xSlideshow.is() && xSlideshow->isRunning() && xSlideshow->IsInteractiveSlideshow());
+ setInteractiveSlideShow(bIASS);
+ }
bool bReturn = FmFormView::SdrBeginTextEdit(
pObj, pPV, pWin, bIsNewObj, pOutl,