This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 4b04c19b27 svx: drop the model pointer when a table cell is disposed
4b04c19b27 is described below

commit 4b04c19b27cef8b0c77f01d2126079cba90dc7bd
Author: Jim Jagielski <[email protected]>
AuthorDate: Wed Nov 4 07:26:06 2026 -0500

    svx: drop the model pointer when a table cell is disposed
    
    ~Cell used the freed SdrModel when a UNO client released a cell after its 
document was closed.
---
 main/svx/source/table/cell.cxx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/main/svx/source/table/cell.cxx b/main/svx/source/table/cell.cxx
index baa37d69f5..9de1bc1a3d 100644
--- a/main/svx/source/table/cell.cxx
+++ b/main/svx/source/table/cell.cxx
@@ -349,7 +349,9 @@ void Cell::dispose()
                delete mpProperties;
                mpProperties = 0;
        }
-       SetOutlinerParaObject( 0 );
+       // the model can be gone when the last reference to the cell is released
+       SdrText::SetOutlinerParaObject( 0 );
+       SdrText::SetModel( 0 );
 }
 
 // 
-----------------------------------------------------------------------------

Reply via email to