diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-11-05 16:04:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-05 16:12:51 +0000 |
commit | 603e9338568c29c01f812c4fd47b7e8138e015bb (patch) | |
tree | 2384b068429b23b15a21ef22f3832db056725143 /starmath | |
parent | 2e5167528f7566dd9b000e50fc1610b7bf99132a (diff) |
Resolves: fdo#58094 don't crash on attempting mml import
Change-Id: I812f2b3e333ea59e9ebfc75a854faca050af8711
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathmlimport.cxx | 5 | ||||
-rw-r--r-- | starmath/source/node.cxx | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 073d96c5b92b..f8a272e95edf 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -2248,10 +2248,11 @@ void SmXMLRowContext_Impl::EndElement() { SmNodeArray aRelationArray; SmNodeStack &rNodeStack = GetSmImport().GetNodeStack(); - sal_uLong nSize = rNodeStack.size()-nElementCount; - if (nSize > 0) + if (rNodeStack.size() > nElementCount) { + sal_uLong nSize = rNodeStack.size() - nElementCount; + aRelationArray.resize(nSize); for (sal_uLong j=nSize;j > 0;j--) { diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index d8832a583d9e..819bc5e318f3 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -2521,7 +2521,8 @@ void SmMatrixNode::CreateTextFromNode(OUString &rText) for (sal_uInt16 j = 0; j < nNumCols; j++) { SmNode *pNode = GetSubNode(i * nNumCols + j); - pNode->CreateTextFromNode(rText); + if (pNode) + pNode->CreateTextFromNode(rText); if (j != nNumCols-1) rText += "# "; } |