starmath/source/cursor.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c13671108fa7cee0cc1801e4c08800de1daab850
Author:     Luke Dixon <[email protected]>
AuthorDate: Sun Aug 30 13:35:20 2020 +0100
Commit:     Noel Grandin <[email protected]>
CommitDate: Wed Sep 2 20:55:25 2020 +0200

    Fix crash when entering newline in starmath experimental editor
    
    Currently things crash when adding a newline using the experimental
    editor in Math Formula editor. It looks like this is happening because
    the newly inserted line was getting destroyed when the unique_ptr goes
    out of scope.
    
    This change releases the unique_ptr so it doesn't get destroyed. As it
    is now part of the tree it should be destroyed elsewhere.
    
    Change-Id: Icfe2c0289c12302d39883dc04cef0351467aa845
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101737
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 2aae7adb555e..5e69b5876a45 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -765,7 +765,7 @@ bool SmCursor::InsertRow() {
             pTable->SetSubNode(i, pTable->GetSubNode(i-1));
 
         //Insert new line
-        pTable->SetSubNode(nTableIndex + 1, pNewLine.get());
+        pTable->SetSubNode(nTableIndex + 1, pNewLine.release());
 
         //Check if we need to change token type:
         if(pTable->GetNumSubNodes() > 2 && pTable->GetToken().eType == TBINOM) 
{
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to