summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-17 22:22:10 +0200
committerwm4 <wm4@nowhere>2014-10-17 22:22:10 +0200
commitd15df0064368652e69fdadc7e5d99c47bfaed9c6 (patch)
tree83c0ed044983f3d54ad37da16d2a310e6256467d /video/out
parent201a65635055cb5a2987dc23819ba0fcb18e4e14 (diff)
downloadmpv-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.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/w32_common.c1
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: