mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
d3dvideosink: Fix crash on WinProc handler
... caused by null pointer dereference. The d3dvideosink object might not available yet on the handler.
This commit is contained in:
parent
58afcf09b4
commit
736df5604f
1 changed files with 5 additions and 0 deletions
|
@ -2046,6 +2046,11 @@ d3d_wnd_proc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
WNDPROC proc;
|
||||
LRESULT ret = 0;
|
||||
|
||||
/* d3dvideosink object might not available yet.
|
||||
* The thread for message queue starts earlier than SetProp... */
|
||||
if (!sink)
|
||||
return DefWindowProc (hWnd, message, wParam, lParam);
|
||||
|
||||
LOCK_SINK (sink);
|
||||
proc = sink->d3d.orig_wnd_proc;
|
||||
UNLOCK_SINK (sink);
|
||||
|
|
Loading…
Reference in a new issue