diff options
author | Noel Grandin <noel@peralex.com> | 2016-07-05 14:47:16 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-07-05 21:04:15 +0000 |
commit | 2a23d9cc4d5d3e746fec62a41bf85bb81a4c299d (patch) | |
tree | 72ebdcb4e0d5ad5ce75193b13b308a986dd0cdbc /sw | |
parent | 6f0e3d508dea229e456e3b29abe2f2b3c77a2cf9 (diff) |
when disposing popup menus, don't leave dangling pointers
Change-Id: Ia1b49937ba0693a567097367b99b75a3011666bf
Reviewed-on: https://gerrit.libreoffice.org/26960
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/ribbar/workctrl.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 5ff38fdd9273..02a0b42858a1 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -164,8 +164,7 @@ void SwTbxAutoTextCtrl::DelPopup() { for( sal_uInt16 i = 0; i < pPopup->GetItemCount(); i ++ ) { - VclPtr<PopupMenu> pSubPopup = pPopup->GetPopupMenu(pPopup->GetItemId(i)); - pSubPopup.disposeAndClear(); // NoelG: dodgy, this leaves a dangling pointer + pPopup->DisposePopupMenu(pPopup->GetItemId(i)); } pPopup.disposeAndClear(); } |