summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-27 10:57:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-27 12:58:45 +0000
commit6fdd21e4bc9f779a7ae77eb4612fdf0dcef76b9d (patch)
tree1d1caef4616563699609e1b7c11799993eb5b10c /sc
parent1cbe667d3e205f02d39d73267f2d4fbdf94b639f (diff)
coverity#1187679 Dereference null return value
Change-Id: I58c0974d02f1f9e5617476182ed9ce5c50debd70
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 7fe2727b6943..ac2c96dd5af6 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -6548,6 +6548,8 @@ void SAL_CALL ScCellObj::setFormulaResult( double nValue ) throw(uno::RuntimeExc
if ( pDocSh && pDocSh->GetDocument()->GetCellType( aCellPos ) == CELLTYPE_FORMULA )
{
ScFormulaCell* pCell = pDocSh->GetDocument()->GetFormulaCell(aCellPos);
+ if (!pCell)
+ return;
pCell->SetHybridDouble( nValue );
pCell->ResetDirty();
pCell->SetChanged(false);