diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-30 15:10:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-31 09:47:20 +0200 |
commit | 50fa8ea7406c5ac94f54c497e43f2489a7af24c8 (patch) | |
tree | f70b2383d6917e298b9dc01500f8570b510a39fe | |
parent | 55cc7b0d96bb2e21ff101cde9ea08e9b0091147a (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>
-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 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()); } |