From aa0d0536a444fb26d9e570bd6bf6c1bdc3596cf3 Mon Sep 17 00:00:00 2001 From: Noel Grandin <noel@peralex.com> Date: Mon, 20 Jun 2016 15:56:35 +0200 Subject: tdf#97527 - vcl: reference-count Menu some places are marked with "dodgy"- need to check those to see what is going on, because they are leaving dangling pointers behind in the Menu class Change-Id: I41d5c7c0fec2f70ce9e3ffdc48cd03d26c0a869b Reviewed-on: https://gerrit.libreoffice.org/26516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> --- include/toolkit/awt/vclxmenu.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/toolkit') diff --git a/include/toolkit/awt/vclxmenu.hxx b/include/toolkit/awt/vclxmenu.hxx index d092692a0110..e042e014ea14 100644 --- a/include/toolkit/awt/vclxmenu.hxx +++ b/include/toolkit/awt/vclxmenu.hxx @@ -33,6 +33,7 @@ #include <osl/mutex.hxx> #include <tools/link.hxx> +#include <vcl/vclptr.hxx> #include <vector> @@ -59,7 +60,7 @@ class TOOLKIT_DLLPUBLIC VCLXMenu : public css::awt::XMenuBar, { private: ::osl::Mutex maMutex; - Menu* mpMenu; + VclPtr<Menu> mpMenu; MenuListenerMultiplexer maMenuListeners; PopupMenuRefList maPopupMenuRefs; -- cgit