editeng/source/editeng/editview.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit e4d1551697406bab0e9973bfa8ac012c48ff8eea Author: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Date: Fri Nov 10 11:06:46 2017 +0100 tdf#113591 Fix crash when switching between Calc and other LO window Need to get the ContentNode from EditDoc, as the selection might have a pointer to an already deleted ContentNode. Change-Id: I5c17be8ec2cbc57686eaf90e8b03c026aea7f28f Reviewed-on: https://gerrit.libreoffice.org/44583 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 9a932217eb4f..d7539558ffbb 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -252,11 +252,13 @@ bool EditView::IsReadOnly() const void EditView::SetSelection( const ESelection& rESel ) { - // If someone has just left an empty attribute, and then the outliner - // manipulates the selection: + // If someone has just left an empty attribute, and then the outliner manipulates the + // selection, call the CursorMoved method so that empty attributes get cleaned up. if ( !HasSelection() ) { - const ContentNode* pNode = pImpEditView->GetEditSelection().Max().GetNode(); + // tdf#113591 Get node from EditDoc, as the selection might have a pointer to an + // already deleted node. + const ContentNode* pNode = pImpEditView->pEditEngine->GetEditDoc().GetEndPaM().GetNode(); pImpEditView->pEditEngine->CursorMoved( pNode ); } EditSelection aNewSelection( pImpEditView->pEditEngine->pImpEditEngine->ConvertSelection( _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits