sd/source/ui/app/sdmod1.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit acb9c4ff1b3cd6a4fca29bb0d7551776e6957c32
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Feb 15 09:26:16 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Feb 15 11:31:48 2023 +0000

    crashreporter: apparent null dereference
    
    Change-Id: I83f0765311ffdb34a0c08aaf616fdbde4e5110a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147054
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Tested-by: Jenkins

diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 927b37ae830e..573ee853069b 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -493,9 +493,12 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & 
rReq )
             // was open
             if (pFrame && SfxApplication::IsTipOfTheDayDue() && 
!SfxApplication::IsHeadlessOrUITest())
             {
-                // tdf#127946 pass in argument for dialog parent
-                SfxUnoFrameItem aDocFrame(SID_FILLFRAME, 
pFrame->GetFrameInterface());
-                GetDispatcher()->ExecuteList(SID_TIPOFTHEDAY, 
SfxCallMode::SLOT, {}, { &aDocFrame });
+                if (SfxDispatcher* pDispatcher = GetDispatcher())
+                {
+                    // tdf#127946 pass in argument for dialog parent
+                    SfxUnoFrameItem aDocFrame(SID_FILLFRAME, 
pFrame->GetFrameInterface());
+                    pDispatcher->ExecuteList(SID_TIPOFTHEDAY, 
SfxCallMode::SLOT, {}, { &aDocFrame });
+                }
             }
         }
     }

Reply via email to