From ada652802db80202090fe55915d0b6ce648de59f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 25 Sep 2020 09:26:31 +0200 Subject: [PATCH] tdf#137008 mml crash on load Change-Id: I1d35f1b6cb7234850c6847b19848be186f2e1955 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103370 Tested-by: Jenkins Reviewed-by: Noel Grandin --- starmath/source/visitors.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index 37a8fc7ab595..f4db5c10257f 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -2335,7 +2335,8 @@ void SmNodeToTextVisitor::Visit( SmMatrixNode* pNode ) { SmNode* pSubNode = pNode->GetSubNode( i * pNode->GetNumCols( ) + j ); Separate( ); - pSubNode->Accept( this ); + if (pSubNode) + pSubNode->Accept( this ); Separate( ); if (j != pNode->GetNumCols() - 1U) Append( "#" );