diff options
author | Aron Budea <aron.budea@collabora.com> | 2017-04-03 02:21:28 +0200 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2017-04-05 18:06:52 +0000 |
commit | 9fcb6cb86893b991ceb6395fbabba63c962f59db (patch) | |
tree | ebca63dc2945b5908609a91ede938a88a43c263f /include | |
parent | 137ad218db262fb3531215adbc88b7093b4999c7 (diff) |
tdf#104686: do not crash if Menu has been somehow disposed
The rare crashes in MenuFloatingWindow::ImplGetStartY() and
MenuFloatingWindow::ImplScroll(bool) likely happen because
of a disposed Menu.
Let's guard against invalid accesses.
Change-Id: Ie31240abbc48c06edd40d0a95f319725cdb3db16
Reviewed-on: https://gerrit.libreoffice.org/36026
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/36151
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/menu.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 3c132cc32e07..1c2e82a69683 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -133,7 +133,7 @@ class VCL_DLLPUBLIC Menu : public Resource, public VclReferenceBase friend struct ImplMenuDelData; private: ImplMenuDelData* mpFirstDel; - MenuItemList* pItemList; // Liste mit den MenuItems + std::unique_ptr<MenuItemList> pItemList; // list with MenuItems MenuLogo* pLogo; VclPtr<Menu> pStartedFrom; VclPtr<vcl::Window> pWindow; @@ -359,7 +359,7 @@ public: // Fuer Menu-'Funktionen' MenuItemList* GetItemList() const { - return pItemList; + return pItemList.get(); } // returns the system's menu handle if native menus are supported |