From 2a23d9cc4d5d3e746fec62a41bf85bb81a4c299d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 5 Jul 2016 14:47:16 +0200 Subject: when disposing popup menus, don't leave dangling pointers Change-Id: Ia1b49937ba0693a567097367b99b75a3011666bf Reviewed-on: https://gerrit.libreoffice.org/26960 Tested-by: Jenkins Reviewed-by: Michael Meeks Tested-by: Michael Meeks --- sw/source/uibase/ribbar/workctrl.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw') 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 pSubPopup = pPopup->GetPopupMenu(pPopup->GetItemId(i)); - pSubPopup.disposeAndClear(); // NoelG: dodgy, this leaves a dangling pointer + pPopup->DisposePopupMenu(pPopup->GetItemId(i)); } pPopup.disposeAndClear(); } -- cgit