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

Oliver Specht oliver.specht at cib.de
Sat Feb 27 21:26:21 UTC 2016


 starmath/source/node.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 529e06a1b855ac83468230a15903aeafe1ac89a7
Author: Oliver Specht <oliver.specht at cib.de>
Date:   Fri Feb 26 10:40:45 2016 +0100

    tdf#98088: prevent access to invalid sub node
    
    Change-Id: I73bd77682bfb60474ba18ca85bc5d008c70a7f97
    Reviewed-on: https://gerrit.libreoffice.org/22715
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 8bd1ca8..77a825a 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2060,7 +2060,8 @@ void SmFontNode::CreateTextFromNode(OUString &rText)
         default:
             break;
     }
-    GetSubNode(1)->CreateTextFromNode(rText);
+    if(GetNumSubNodes() > 1)
+        GetSubNode(1)->CreateTextFromNode(rText);
 }
 
 void SmFontNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)


More information about the Libreoffice-commits mailing list