diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-05 12:28:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-05 15:20:33 +0100 |
commit | 05652e51420630310606ac29f86e76f3bb148af5 (patch) | |
tree | d676ec45f683dd67dc41a560bdf2df72247e5345 | |
parent | 3d8c159841bcab7365b2bed3df71ed3c15188312 (diff) |
ofz#11261 null-deref
Change-Id: I2a6b17feb500be9b76f89ed3ae177f44f4c164ec
Reviewed-on: https://gerrit.libreoffice.org/62896
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | xmloff/source/text/txtparai.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 4b1ed3061456..562a7def9a69 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -639,6 +639,11 @@ void XMLImpRubyContext_Impl::EndElement() GetImport().GetTextImport()); const Reference < XTextCursor > xAttrCursor( xTextImport->GetText()->createTextCursorByRange( m_xStart )); + if (!xAttrCursor.is()) + { + SAL_WARN("xmloff.text", "cannot insert ruby"); + return; + } xAttrCursor->gotoRange(xTextImport->GetCursorAsRange()->getStart(), true); xTextImport->SetRuby( GetImport(), xAttrCursor, |