diff options
Diffstat (limited to 'starmath/source/cursor.cxx')
-rw-r--r-- | starmath/source/cursor.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 033231a28b3a..bc6d5227d043 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -1012,12 +1012,13 @@ void SmCursor::InsertSpecial(const OUString& _aString) void SmCursor::InsertCommandText(const OUString& aCommandText) { //Parse the sub expression - SmNode* pSubExpr = SmParser().ParseExpression(aCommandText); + auto xSubExpr = SmParser().ParseExpression(aCommandText); //Prepare the subtree - pSubExpr->Prepare(mpDocShell->GetFormat(), *mpDocShell, 0); + xSubExpr->Prepare(mpDocShell->GetFormat(), *mpDocShell, 0); //Convert subtree to list + SmNode* pSubExpr = xSubExpr.release(); SmNodeList* pLineList = NodeToList(pSubExpr); BeginEdit(); |