summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-10-01 17:47:17 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-01 21:21:34 +0300
commit2fb543496a61974edd15c2bfefbc83abe225a85a (patch)
treecd600916e5cdf7cf0312d585efa1ed4ed0559f26 /starmath
parentecbe980c609de8e719243d6bd4f75d3e9c4aec61 (diff)
Add sanity check to avoid crash
I got a crash when saving doc from fdo#45349 as .fodt. Change-Id: I704d86e846e78848d914de7b48da6c9fa4075150
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/mathmlexport.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 4e9e4ec5f587..7fffe8ff342c 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -861,6 +861,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
{
const SmNode *pLine = pNode->GetSubNode(nSize-1);
if (pLine->GetType() == NLINE && pLine->GetNumSubNodes() == 1 &&
+ pLine->GetSubNode(0) != NULL &&
pLine->GetSubNode(0)->GetToken().eType == TNEWLINE)
--nSize;
}