[Libreoffice-commits] core.git: sc/source

Caolán McNamara caolanm at redhat.com
Fri Mar 20 02:58:56 PDT 2015


 sc/source/filter/xml/xmldpimp.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 1dc47816ac137d9bd5ce2070fdec1ddebebcbbd3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 20 09:43:46 2015 +0000

    coverity#988421 unchecked return value
    
    Change-Id: I822c21cd3c3bd8f720e39f540b4931050d62fb91

diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index ca44604..c080158 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();
 }
 


More information about the Libreoffice-commits mailing list