[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - writerfilter/source

Julien Nabet serval2412 at yahoo.fr
Tue Jun 11 03:12:22 PDT 2013


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

New commits:
commit a5caaad1b83ecb8d6a17f0608c2716a5e69ae86c
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>
    Reviewed-on: https://gerrit.libreoffice.org/4223

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