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
@ -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…
x
Reference in New Issue
Block a user