[vlc-commits] win32/events: fix crash when the window is being reopened
Steve Lhomme
git at videolan.org
Tue Nov 7 19:21:59 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Nov 7 16:02:00 2017 +0100| [910722dd312819c2fcd4d0f72b177ac3b78a1cad] | committer: Jean-Baptiste Kempf
win32/events: fix crash when the window is being reopened
We may receive a stray message with no window attached, we just discard it.
Fixes #18753
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=910722dd312819c2fcd4d0f72b177ac3b78a1cad
---
modules/video_output/win32/events.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index 88e67acba3..935ac562f7 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -122,9 +122,12 @@ 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 );
+ VLC_UNUSED(uMsg); VLC_UNUSED(dwTime);
+ if (hwnd)
+ {
+ event_thread_t *p_event = (event_thread_t *)idEvent;
+ UpdateCursor( p_event, false );
+ }
}
static void UpdateCursorMoved( event_thread_t *p_event )
More information about the vlc-commits
mailing list