Skip to content

Commit

Permalink
d3d11_fmt: don't crash on missing external ID3D11DeviceContext
Browse files Browse the repository at this point in the history
  • Loading branch information
robUx4 committed Apr 2, 2021
1 parent dd514b9 commit f3b16b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/video_chroma/d3d11_fmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ void D3D11_ReleaseDevice(d3d11_decoder_device_t *dev_sys)
static HRESULT D3D11_CreateDeviceExternal(vlc_object_t *obj, ID3D11DeviceContext *d3d11ctx,
bool hw_decoding, d3d11_device_t *out)
{
if (unlikely(d3d11ctx == NULL))
{
msg_Err(obj, "missing external ID3D11DeviceContext");
return S_FALSE;
}

HRESULT hr;
ID3D11DeviceContext_GetDevice( d3d11ctx, &out->d3ddevice );

Expand Down

0 comments on commit f3b16b6

Please sign in to comment.