diff options
author | wm4 <wm4@nowhere> | 2014-10-17 22:22:10 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-17 22:22:10 +0200 |
commit | d15df0064368652e69fdadc7e5d99c47bfaed9c6 (patch) | |
tree | 83c0ed044983f3d54ad37da16d2a310e6256467d | |
parent | 201a65635055cb5a2987dc23819ba0fcb18e4e14 (diff) | |
download | mpv-d15df0064368652e69fdadc7e5d99c47bfaed9c6.tar.bz2 mpv-d15df0064368652e69fdadc7e5d99c47bfaed9c6.tar.xz |
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.
-rw-r--r-- | video/out/w32_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index addc46bf0e..541000a7f9 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -579,6 +579,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, return 0; case WM_DESTROY: w32->destroyed = true; + w32->window = NULL; PostQuitMessage(0); return 0; case WM_SYSCOMMAND: |