summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx3
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();
}