summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-20 09:43:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-20 09:58:30 +0000
commit1dc47816ac137d9bd5ce2070fdec1ddebebcbbd3 (patch)
tree3d2752511794163d1052653edaa8e3c065d5af85 /sc
parent2db08b9ed6427bfa2c7d611b1a7294cb77c6e9b9 (diff)
coverity#988421 unchecked return value
Change-Id: I822c21cd3c3bd8f720e39f540b4931050d62fb91
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index ca44604f464f..c080158c301a 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -558,7 +558,12 @@ void ScXMLDataPilotTableContext::EndElement()
if ( pDPCollection->GetByName(pDPObject->GetName()) )
pDPObject->SetName( OUString() ); // ignore the invalid name, create a new name in AfterXMLLoading
- pDPCollection->InsertNewTable(pDPObject);
+ if (!pDPCollection->InsertNewTable(pDPObject))
+ {
+ OSL_FAIL("cannot insert DPObject");
+ DELETEZ( pDPObject );
+ }
+
SetButtons();
}