[SHELL32] Only hide a window when there is a window to hide

This commit is contained in:
Mark Jansen 2022-09-11 22:14:46 +02:00
parent d0ba8fd4a3
commit 96e3c7bcc5
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -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);
}