diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-04-21 11:23:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-04-21 15:52:07 +0200 |
commit | 3902cfcd14cc66ee52b6d5bca7621bf30d6f4095 (patch) | |
tree | 4a7155164d4107a0f222e5ba8892902e349d58e4 /starmath | |
parent | c076f7602962cdaaff0acd78256bda75838c4a9e (diff) |
cid#1476301 Dereference null return value
Change-Id: I7dff59f18fdf08389e7f279001627da4e5e3baeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114392
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/edit.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index a02ad7436500..4c3549ec8d62 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -784,8 +784,9 @@ void SmEditTextWindow::UpdateStatus(bool bSetDocModified) SmModule *pMod = SM_MOD(); if (pMod && pMod->GetConfig()->IsAutoRedraw()) Flush(); - if ( bSetDocModified ) - mrEditWindow.GetDoc()->SetModified(); + SmDocShell* pDoc = bSetDocModified ? mrEditWindow.GetDoc() : nullptr; + if (pDoc) + pDoc->SetModified(); } void SmEditWindow::Cut() |