mirror of https://github.com/mpv-player/mpv
vo_opengl: hwdec_d3d11egl: remove broken code on error path
If ID3D11Device_QueryInterface fails, "multithread" will be set to NULL. The _Release would just make it crash with a null pointer deref.
This commit is contained in:
parent
69d5be1ee9
commit
7373158703
|
@ -177,7 +177,6 @@ static int create(struct gl_hwdec *hw)
|
||||||
hr = ID3D11Device_QueryInterface(p->d3d11_device, &IID_ID3D10Multithread,
|
hr = ID3D11Device_QueryInterface(p->d3d11_device, &IID_ID3D10Multithread,
|
||||||
(void **)&multithread);
|
(void **)&multithread);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
ID3D10Multithread_Release(multithread);
|
|
||||||
MP_ERR(hw, "Failed to get Multithread interface: %s\n",
|
MP_ERR(hw, "Failed to get Multithread interface: %s\n",
|
||||||
mp_HRESULT_to_str(hr));
|
mp_HRESULT_to_str(hr));
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
Loading…
Reference in New Issue