summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-07-05 14:47:16 +0200
committerMichael Meeks <michael.meeks@collabora.com>2016-07-05 21:04:15 +0000
commit2a23d9cc4d5d3e746fec62a41bf85bb81a4c299d (patch)
tree72ebdcb4e0d5ad5ce75193b13b308a986dd0cdbc /svx
parent6f0e3d508dea229e456e3b29abe2f2b3c77a2cf9 (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 'svx')
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 9a1fa116638e..e397ec973169 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -776,14 +776,13 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
enum InspectorAction { eOpenInspector, eCloseInspector, eUpdateInspector, eNone };
-void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMenu& rMenu, sal_uInt16 nExecutionResult)
+void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu, sal_uInt16 nExecutionResult)
{
Reference< css::container::XIndexContainer > xCols(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns());
sal_uInt16 nPos = GetModelColumnPos(nColId);
// remove and delete the menu we inserted in PreExecuteColumnContextMenu
- VclPtr<PopupMenu> pControlMenu = rMenu.GetPopupMenu(SID_FM_CHANGECOL);
- pControlMenu.disposeAndClear(); // NoelG: dodgy, this leaves a dangling pointer
+ rMenu.DisposePopupMenu(SID_FM_CHANGECOL);
OUString aFieldType;
bool bReplace = false;