1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d11] nullptr check on Begin and End (#295)

This commit is contained in:
ZeroFault 2018-04-17 05:57:40 -06:00 committed by Philip Rebohle
parent d043753e7c
commit a248ae985d

View File

@ -181,6 +181,9 @@ namespace dxvk {
void STDMETHODCALLTYPE D3D11DeviceContext::Begin(ID3D11Asynchronous *pAsync) {
if (pAsync == nullptr)
return;
Com<ID3D11Query> query;
if (SUCCEEDED(pAsync->QueryInterface(__uuidof(ID3D11Query), reinterpret_cast<void**>(&query)))) {
@ -198,8 +201,11 @@ namespace dxvk {
void STDMETHODCALLTYPE D3D11DeviceContext::End(ID3D11Asynchronous *pAsync) {
if (pAsync == nullptr)
return;
Com<ID3D11Query> query;
if (SUCCEEDED(pAsync->QueryInterface(__uuidof(ID3D11Query), reinterpret_cast<void**>(&query)))) {
Com<D3D11Query> queryPtr = static_cast<D3D11Query*>(query.ptr());