summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-28 10:47:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-28 13:14:01 +0000
commitc39a664f7ae5ffcb5af820afb06d6eb37e688b80 (patch)
tree817fbdc7d28e9e3ead23300b852966ab10d505ec /starmath
parent224d2153732327611f14af5819bc3f37ff2dc910 (diff)
coverity#705479 Dereference null return value
Change-Id: Id8b6723e7d3d8a66f5a657628e1467edda509cfa
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/edit.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index b8cb8749371b..ca437e621baa 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -489,9 +489,9 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
// have doc-shell modified only for formula input/change and not
// cursor travelling and such things...
SmDocShell *pDocShell = GetDoc();
- if (pDocShell)
- pDocShell->SetModified( GetEditEngine()->IsModified() );
-
+ EditEngine *pEditEngine = GetEditEngine();
+ if (pDocShell && pEditEngine)
+ pDocShell->SetModified(pEditEngine->IsModified());
aModifyTimer.Start();
}