writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 3 +++ writerfilter/source/ooxml/OOXMLParserState.cxx | 3 +++ 2 files changed, 6 insertions(+)
New commits: commit 31ca5ba5150ea8fb3666d8b5da5cdbadaafedd5e Author: Caolán McNamara <[email protected]> Date: Thu Jun 6 11:41:03 2013 +0100 add some checks against NULL derefs Change-Id: I85fbf279991ee361ea081d92d9acc84d36677af1 (cherry picked from commit fa671cecd4bb2f38a0a9171cfdbb56efddda1cfa) Signed-off-by: Miklos Vajna <[email protected]> diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 24af62c..7edbaec 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -1343,6 +1343,9 @@ void OOXMLFastContextHandlerProperties::lcl_endFastElement { if (isForwardEvents()) { + SAL_WARN_IF(!mpStream, "writerfilter", "no stream to set properties on"); + if (!mpStream) + return; mpStream->props(mpPropertySet); } } diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx index 7e9b474..1352d73 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.cxx +++ b/writerfilter/source/ooxml/OOXMLParserState.cxx @@ -135,6 +135,9 @@ OOXMLDocument * OOXMLParserState::getDocument() const void OOXMLParserState::setXNoteId(const sal_Int32 nId) { + SAL_WARN_IF(!mpDocument, "writerfilter", "no document to set note id on"); + if (!mpDocument) + return; mpDocument->setXNoteId(nId); }
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
