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

Julien Nabet serval2412 at yahoo.fr
Mon Jun 10 01:27:40 PDT 2013


 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit dcfefd6676d8cf8930424724a509cce0d3612962
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Jun 8 15:28:55 2013 +0200

    Related fdo#33895 add some checks against NULL derefs
    
    Change-Id: I9c62a063788a494125ce8dc27748ed66022f5c48
    Reviewed-on: https://gerrit.libreoffice.org/4199
    Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 205f821..fc6eb3e 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -1161,8 +1161,13 @@ void OOXMLFastContextHandler::resolveFooter
 // Add the data pointed to by the reference as another property.
 void OOXMLFastContextHandler::resolveData(const OUString & rId)
 {
+    OOXMLDocument * objDocument = getDocument();
+    SAL_WARN_IF(!objDocument, "writerfilter", "no document to resolveData");
+    if (!objDocument)
+        return;
+
     uno::Reference<io::XInputStream> xInputStream
-        (mpParserState->getDocument()->getInputStreamForId(rId));
+        (objDocument->getInputStreamForId(rId));
 
     OOXMLValue::Pointer_t aValue(new OOXMLInputStreamValue(xInputStream));
 


More information about the Libreoffice-commits mailing list