[Libreoffice-commits] core.git: writerfilter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 1 13:01:48 UTC 2018
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 44236073b2d20dfaa003b1bbb1f49162f38e5b23
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 1 09:04:58 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 1 15:01:23 2018 +0200
forcepoint#56 null deref
Change-Id: Iaa9c4d6901a340145412fa46eaf5c292c3fb62e8
Reviewed-on: https://gerrit.libreoffice.org/58385
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c6a68079c4ab..9e35322c5fa7 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3083,15 +3083,17 @@ void DomainMapper_Impl::PushFieldContext()
TagLogger::getInstance().element("pushFieldContext");
#endif
- uno::Reference< text::XTextAppend > xTextAppend;
+ uno::Reference<text::XTextCursor> xCrsr;
if (!m_aTextAppendStack.empty())
- xTextAppend = m_aTextAppendStack.top().xTextAppend;
- uno::Reference< text::XTextRange > xStart;
- if (xTextAppend.is())
{
- uno::Reference< text::XTextCursor > xCrsr = xTextAppend->createTextCursorByRange( xTextAppend->getEnd() );
- xStart = xCrsr->getStart();
+ uno::Reference<text::XTextAppend> xTextAppend = m_aTextAppendStack.top().xTextAppend;
+ if (xTextAppend.is())
+ xCrsr = xTextAppend->createTextCursorByRange(xTextAppend->getEnd());
}
+
+ uno::Reference< text::XTextRange > xStart;
+ if (xCrsr.is())
+ xStart = xCrsr->getStart();
m_aFieldStack.push( new FieldContext( xStart ) );
}
/*-------------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list