sd/source/ui/view/sdview.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit eeca3ea10109aeea45d7da279c05ef278d4e2cd0
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Oct 18 01:32:08 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Oct 18 08:43:36 2024 +0200

    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 <xiscofa...@libreoffice.org>

diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 90bbbdc69511..2159edb966d0 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,

Reply via email to