mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-23 09:04:15 +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;
|
WNDPROC proc;
|
||||||
LRESULT ret = 0;
|
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);
|
LOCK_SINK (sink);
|
||||||
proc = sink->d3d.orig_wnd_proc;
|
proc = sink->d3d.orig_wnd_proc;
|
||||||
UNLOCK_SINK (sink);
|
UNLOCK_SINK (sink);
|
||||||
|
|
Loading…
Reference in a new issue