diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-23 12:34:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-23 14:16:11 +0100 |
commit | c5920fe23a0e4b2cb333125f3315063d4a58f2b5 (patch) | |
tree | 230a7c3a42af52ba2b530ff70237e9dc22252416 /sc/qa | |
parent | 6ae8ade6410881f2f01d57968abc8463750f18a8 (diff) |
coverity#1187686 Dereference null return value
Change-Id: Ibbebba7bf421bf7f328a940c7f3d5295c975573c
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc_sharedformula.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx index d3fc16b16916..76ba05eebdcd 100644 --- a/sc/qa/unit/ucalc_sharedformula.cxx +++ b/sc/qa/unit/ucalc_sharedformula.cxx @@ -125,6 +125,7 @@ void Test::testSharedFormulas() CPPUNIT_ASSERT_MESSAGE("This cell should have been emptied.", m_pDoc->GetCellType(aPos) == CELLTYPE_NONE); aPos.SetRow(12); // B13 pFC = m_pDoc->GetFormulaCell(aPos); + CPPUNIT_ASSERT(pFC); // B13:B18 should be shared. CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(12), pFC->GetSharedTopRow()); CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(6), pFC->GetSharedLength()); @@ -146,6 +147,7 @@ void Test::testSharedFormulas() // B15:B18 should be shared. aPos.SetRow(14); // B15 pFC = m_pDoc->GetFormulaCell(aPos); + CPPUNIT_ASSERT(pFC); CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(14), pFC->GetSharedTopRow()); CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(4), pFC->GetSharedLength()); CPPUNIT_ASSERT_MESSAGE("The token is expected to be shared.", pFC->GetCode() == pFC->GetSharedCode()); @@ -155,6 +157,7 @@ void Test::testSharedFormulas() m_pDoc->SetValue(aPos, 1.2); aPos.SetRow(15); pFC = m_pDoc->GetFormulaCell(aPos); + CPPUNIT_ASSERT(pFC); // B16:B18 should be shared. CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(15), pFC->GetSharedTopRow()); CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(3), pFC->GetSharedLength()); |