| commit | 775a205a334659c124c02272edd81a01af69cf47 | [log] |
|---|---|---|
| author | Caolán McNamara <caolanm@redhat.com> | Wed May 27 12:55:25 2020 +0100 |
| committer | Caolán McNamara <caolanm@redhat.com> | Thu May 28 15:21:44 2020 +0200 |
| tree | 575993fcf09a2491863dcb86bf1cb5dcc881d4de | |
| parent | 3d3066b124b23d18a06fbd14938e18696dc5c9cd [diff] |
Resolves: tdf#133385 dangling pTargetEntry after remove or clear Change-Id: Id04b08ea5af1341d548f7bb1e3c3c7f5b7197548 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94955 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index d8bc727..bb52e28 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx
@@ -1977,6 +1977,7 @@ void SvTreeListBox::LoseFocus() void SvTreeListBox::ModelHasCleared() { pImpl->m_pCursor = nullptr; // else we crash in GetFocus when editing in-place pTargetEntry = nullptr; pEdCtrl.reset(); pImpl->Clear(); nFocusWidth = -1; @@ -2250,8 +2251,12 @@ void SvTreeListBox::ModelIsRemoving( SvTreeListEntry* pEntry ) void SvTreeListBox::ModelHasRemoved( SvTreeListEntry* pEntry ) { if ( pEntry == pHdlEntry) if (pEntry == pHdlEntry) pHdlEntry = nullptr; if (pEntry == pTargetEntry) pTargetEntry = nullptr; pImpl->EntryRemoved(); }