https://git.reactos.org/?p=reactos.git;a=commitdiff;h=96e3c7bcc508a60dceed8a3911ec922e1d7d4863
commit 96e3c7bcc508a60dceed8a3911ec922e1d7d4863 Author: Mark Jansen <mark.jan...@reactos.org> AuthorDate: Sun Sep 11 22:14:46 2022 +0200 Commit: Mark Jansen <mark.jan...@reactos.org> CommitDate: Mon Sep 12 20:00:39 2022 +0200 [SHELL32] Only hide a window when there is a window to hide --- dll/win32/shell32/shellmenu/CMenuDeskBar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp b/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp index 02e8717eccb..cf8934cd833 100644 --- a/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp +++ b/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp @@ -645,7 +645,8 @@ HRESULT CMenuDeskBar::_CloseBar() if (FAILED_UNEXPECTEDLY(hr)) return hr; - SetWindowPos(NULL, 0, 0, 0, 0, SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOMOVE); + if (m_hWnd) + SetWindowPos(NULL, 0, 0, 0, 0, SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOMOVE); return UIActivateIO(FALSE, NULL); }