[Libreoffice-commits] core.git: xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 5 14:21:38 UTC 2018


 xmloff/source/text/txtparai.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 05652e51420630310606ac29f86e76f3bb148af5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 5 12:28:23 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Nov 5 15:20:33 2018 +0100

    ofz#11261 null-deref
    
    Change-Id: I2a6b17feb500be9b76f89ed3ae177f44f4c164ec
    Reviewed-on: https://gerrit.libreoffice.org/62896
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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,


More information about the Libreoffice-commits mailing list