strmbase: Detach the window from the parent before destroying it.

This fixes a regression introduced by 3b5198c828.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Gabriel Ivăncescu 2020-01-15 00:14:37 -06:00 committed by Alexandre Julliard
parent 9f8935d823
commit 54d82d80d7
1 changed files with 6 additions and 0 deletions

View File

@ -136,9 +136,15 @@ HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This)
HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
{
BaseControlWindow *window = impl_from_BaseWindow(This);
if (!This->hWnd)
return S_OK;
/* Media Player Classic deadlocks if WM_PARENTNOTIFY is sent, so unparent
* the window first. */
IVideoWindow_put_Owner(&window->IVideoWindow_iface, 0);
SendMessageW(This->hWnd, WM_CLOSE, 0, 0);
This->hWnd = NULL;