explorer: Only try to destroy the IShellWindows object if it exists.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52494
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit adda27cdb8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
Alex Henrie 2022-01-30 19:25:07 -07:00 committed by Michael Stefaniuc
parent 9c0dfffe3f
commit c7ae2d5d22
1 changed files with 5 additions and 2 deletions

View File

@ -671,8 +671,11 @@ static LRESULT CALLBACK explorer_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, L
switch(uMsg)
{
case WM_DESTROY:
IShellWindows_Revoke(info->sw, info->sw_cookie);
IShellWindows_Release(info->sw);
if(info->sw)
{
IShellWindows_Revoke(info->sw, info->sw_cookie);
IShellWindows_Release(info->sw);
}
IExplorerBrowser_Unadvise(browser,info->advise_cookie);
IExplorerBrowser_Destroy(browser);