summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-30 15:10:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-31 09:47:20 +0200
commit50fa8ea7406c5ac94f54c497e43f2489a7af24c8 (patch)
treef70b2383d6917e298b9dc01500f8570b510a39fe /starmath
parent55cc7b0d96bb2e21ff101cde9ea08e9b0091147a (diff)
cid#1476301 Dereference null return value
Change-Id: Ibbaa99c28bee97b5194f1a8d396730b7fcc02930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116407 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/edit.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 079be31c88ae..2588e9f60325 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -711,8 +711,9 @@ void SmEditTextWindow::UpdateStatus(bool bSetDocModified)
SmModule *pMod = SM_MOD();
if (pMod && pMod->GetConfig()->IsAutoRedraw())
Flush();
- if (bSetDocModified)
- mrEditWindow.GetDoc()->SetModified();
+
+ if (SmDocShell *pModifyDoc = bSetDocModified ? mrEditWindow.GetDoc() : nullptr)
+ pModifyDoc->SetModified();
static_cast<SmEditEngine*>(GetEditEngine())->executeZoom(GetEditView());
}