https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d0c1df78821e6229f23e3…
commit d0c1df78821e6229f23e3be1d638f550a8f83e45
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Tue Dec 13 10:30:48 2022 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Wed Jan 4 10:32:28 2023 +0100
[SHELL32] Add check to CMenuToolbarBase::ShowDW
This fixes an ATL assert in shell32_apitest:menu
---
dll/win32/shell32/shellmenu/CMenuToolbars.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
index d99f5fc2e5f..0d5cd9ce514 100644
--- a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
+++ b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
@@ -315,6 +315,9 @@ void CMenuToolbarBase::InvalidateDraw()
HRESULT CMenuToolbarBase::ShowDW(BOOL fShow)
{
+ if (m_hWnd == NULL)
+ return S_FALSE;
+
ShowWindow(fShow ? SW_SHOW : SW_HIDE);
// Ensure that the right image list is assigned to the toolbar