https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5b38fed77603a13ff6997ea45949a742b288be44

commit 5b38fed77603a13ff6997ea45949a742b288be44
Author:     Giannis Adamopoulos <gadamopou...@reactos.org>
AuthorDate: Fri Feb 23 12:27:48 2018 +0200
Commit:     Giannis Adamopoulos <gadamopou...@reactos.org>
CommitDate: Fri Feb 23 12:27:48 2018 +0200

    [SHELL32] -CMenuToolbarBase: Remove all buttons on destruction. CORE-13194
    It seems that TBN_DELETINGBUTTON isn't called when the toolbar gets 
destroyed so the only way to avoid leaking the data is emptying it ourselves.
---
 dll/win32/shell32/shellmenu/CMenuToolbars.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp 
b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
index c1cd0b1a95..a33070af2c 100644
--- a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
+++ b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
@@ -287,6 +287,8 @@ CMenuToolbarBase::CMenuToolbarBase(CMenuBand *menuBand, 
BOOL usePager) :
 
 CMenuToolbarBase::~CMenuToolbarBase()
 {
+    ClearToolbar();
+
     if (m_hWnd)
         DestroyWindow();
 

Reply via email to