mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 01:22:30 +00:00
win32: clear window handle on destruction
As I understand, otherwise, the code will try to destroy the same window again in the cleanup part of the gui_thread(), which makes no sense and is potentially dangerous.
This commit is contained in:
parent
201a656350
commit
d15df00643
@ -579,6 +579,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
|||||||
return 0;
|
return 0;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
w32->destroyed = true;
|
w32->destroyed = true;
|
||||||
|
w32->window = NULL;
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
return 0;
|
return 0;
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
|
Loading…
Reference in New Issue
Block a user