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 /svtools | |
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 'svtools')
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 5a19237da730..ddd009e7948a 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2921,9 +2921,7 @@ static void lcl_DeleteSubPopups(PopupMenu* pPopup) if(pSubPopup) { lcl_DeleteSubPopups(pSubPopup); - // NoelG: this looks very dodgy to me, we are attempting to delete this, but we leave a dangling pointer - // in the PopupMenu class? - pSubPopup.disposeAndClear(); + pPopup->DisposePopupMenu( pPopup->GetItemId( i )); } } } |