summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2016-02-26 10:40:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-02-27 21:25:50 +0000
commit529e06a1b855ac83468230a15903aeafe1ac89a7 (patch)
treea1608b304da6ecf83ef18e70e80bc0fcd97d84f2 /starmath
parent271bfb59382e1d23e0f2c90ea8e8e31fd757e3b5 (diff)
tdf#98088: prevent access to invalid sub node
Change-Id: I73bd77682bfb60474ba18ca85bc5d008c70a7f97 Reviewed-on: https://gerrit.libreoffice.org/22715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/node.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 8bd1ca8a9fa8..77a825a596c9 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)