summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-06-08 15:28:55 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-06-11 10:11:59 +0000
commita5caaad1b83ecb8d6a17f0608c2716a5e69ae86c (patch)
treea727277eeeb1efe0aa101f377ef55f9a004d18c1 /writerfilter/source
parent361c25f0ea5c0bae486fb7083d09138ffc8fcedc (diff)
Related fdo#33895 add some checks against NULL derefs
Change-Id: I9c62a063788a494125ce8dc27748ed66022f5c48 Reviewed-on: https://gerrit.libreoffice.org/4199 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz> Reviewed-on: https://gerrit.libreoffice.org/4223
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 205f82152dcf..fc6eb3e390c5 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));