svx/source/sidebar/paragraph/ParaSpacingWindow.cxx |   10 ++++++++--
 sw/source/uibase/sidebar/PageStylesPanel.cxx       |    5 +++++
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 29674e43755d18ece03c30719add0f403f9d90b4
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed May 25 10:27:46 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed May 25 15:21:54 2022 +0200

    50 null derefs seen in crashreporting report
    
    Change-Id: I42f1179ad1d60ac70ccda5362590853a69fd3712
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134901
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx 
b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
index fdfbf6fd0b1f..e149b12b0439 100644
--- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
+++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
@@ -94,7 +94,10 @@ void ParaULSpacingWindow::SetValue(const SvxULSpaceItem* 
pItem)
 
 IMPL_LINK_NOARG(ParaULSpacingWindow, ModifySpacingHdl, 
weld::MetricSpinButton&, void)
 {
-    SfxDispatcher* pDisp = 
SfxViewFrame::Current()->GetBindings().GetDispatcher();
+    SfxViewFrame* pFrame = SfxViewFrame::Current();
+    if (!pFrame)
+        return;
+    SfxDispatcher* pDisp = pFrame->GetBindings().GetDispatcher();
     if(pDisp)
     {
         SvxULSpaceItem aMargin(SID_ATTR_PARA_ULSPACE);
@@ -283,7 +286,10 @@ void ParaLRSpacingWindow::SetUnit(FieldUnit eUnit)
 
 IMPL_LINK_NOARG(ParaLRSpacingWindow, ModifySpacingHdl, 
weld::MetricSpinButton&, void)
 {
-    SfxDispatcher* pDisp = 
SfxViewFrame::Current()->GetBindings().GetDispatcher();
+    SfxViewFrame* pFrame = SfxViewFrame::Current();
+    if (!pFrame)
+        return;
+    SfxDispatcher* pDisp = pFrame->GetBindings().GetDispatcher();
     if(pDisp)
     {
         SvxLRSpaceItem aMargin(SID_ATTR_PARA_LRSPACE);
commit 0c12c167d87faf98ba544ff8abae3aae2e759a1b
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed May 25 10:23:48 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed May 25 15:21:42 2022 +0200

    91 null derefs seen in crashreporting report
    
    Change-Id: I8114f57cf5a5f74b2debac963813dcf6aac1bd0b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134900
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx 
b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index 114349ba194d..2a1de2ebe300 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -160,6 +160,11 @@ void PageStylesPanel::Update()
 {
     const eFillStyle eXFS = 
static_cast<eFillStyle>(mxBgFillType->get_active());
     SfxObjectShell* pSh = SfxObjectShell::Current();
+    if (!pSh)
+    {
+        SAL_WARN("sw.ui", "PageStylesPanel::Update(): no SfxObjectShell 
found");
+        return;
+    }
     switch(eXFS)
     {
         case NONE:

Reply via email to