diff options
-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 += "# "; } |