summaryrefslogtreecommitdiff
path: root/svl/qa/unit
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-21 15:16:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-21 17:05:31 +0000
commit93454f5837fa045286232fff05065304fbfc7431 (patch)
tree2ae4b239675566dda013273969827a8bd8ed090c /svl/qa/unit
parent1939a79c68cc91cd9ca56966e865715a0ea93f60 (diff)
coverity#1399032 Dereference null return value
Change-Id: I1482b1ce9a9ec9556e076c8f74185a9ce29e8d08
Diffstat (limited to 'svl/qa/unit')
-rw-r--r--svl/qa/unit/items/test_itempool.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/svl/qa/unit/items/test_itempool.cxx b/svl/qa/unit/items/test_itempool.cxx
index 38cbda3214da..0987a6bc548a 100644
--- a/svl/qa/unit/items/test_itempool.cxx
+++ b/svl/qa/unit/items/test_itempool.cxx
@@ -135,7 +135,9 @@ void PoolItemTest::testItemSet()
CPPUNIT_ASSERT_EQUAL((sal_uInt16)1, aIter.GetFirstWhich());
CPPUNIT_ASSERT_EQUAL((sal_uInt16)7, aIter.GetLastWhich());
- CPPUNIT_ASSERT_EQUAL((sal_uInt16)1, aIter.FirstItem()->Which());
+ const SfxPoolItem *pFirstItem = aIter.FirstItem();
+ CPPUNIT_ASSERT(pFirstItem);
+ CPPUNIT_ASSERT_EQUAL((sal_uInt16)1, pFirstItem->Which());
CPPUNIT_ASSERT_EQUAL((sal_uInt16)2, aIter.NextItem()->Which());
CPPUNIT_ASSERT_EQUAL((sal_uInt16)3, aIter.NextItem()->Which());
CPPUNIT_ASSERT_EQUAL((sal_uInt16)5, aIter.NextItem()->Which());