[vlc-devel] [PATCH 1/3] win32/events: fix crash when the window is being reopened
Steve Lhomme
robux4 at videolabs.io
Tue Nov 7 16:02:00 CET 2017
We may receive a stray message with no window attached, we just discard it.
Fixes #18753
---
modules/video_output/win32/events.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index 7608007692..a81faaeac1 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -123,8 +123,11 @@ static void MousePressed( event_thread_t *p_event, HWND hwnd, unsigned button );
static void CALLBACK HideMouse(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
{
VLC_UNUSED(hwnd); VLC_UNUSED(uMsg); VLC_UNUSED(dwTime);
- event_thread_t *p_event = (event_thread_t *)idEvent;
- UpdateCursor( p_event, false );
+ if (hwnd)
+ {
+ event_thread_t *p_event = (event_thread_t *)idEvent;
+ UpdateCursor( p_event, false );
+ }
}
static void UpdateCursorMoved( event_thread_t *p_event )
--
2.14.2
More information about the vlc-devel
mailing list