diff options
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() |