summaryrefslogtreecommitdiff
path: root/vcl/source/window/menuitemlist.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-04 14:02:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-04 16:34:53 +0000
commit4904180247c0d5745a393e3cd57eaae29f3837e5 (patch)
treedcdc86ab3f80de6bed1a8d57fe3786084be625f3 /vcl/source/window/menuitemlist.cxx
parent0c3505f01a792449b0c6bf81f518e7a062eea146 (diff)
fix leak from framework::AddonMenuManager::BuildMenu
provide a callback when a menu item gets deleted Change-Id: I5b5f1a181fb10f53f6b1fe7b5637d385e1517530
Diffstat (limited to 'vcl/source/window/menuitemlist.cxx')
-rw-r--r--vcl/source/window/menuitemlist.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx
index d6b680adf6dd..c104ba8a1ef8 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -32,6 +32,8 @@ using namespace vcl;
MenuItemData::~MenuItemData()
{
+ if (aUserValueReleaseFunc)
+ aUserValueReleaseFunc(nUserValue);
if( pAutoSubMenu )
{
static_cast<PopupMenu*>(pAutoSubMenu)->pRefAutoSubMenu = NULL;