mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[host] dxgi: fix possible null dereference
This commit is contained in:
parent
38b6b0ac40
commit
10e30eec57
@ -388,8 +388,9 @@ static bool d3d12_preCopy(ID3D11Texture2D * src, unsigned textureIndex)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
comRef_defineLocal(ID3D12Resource, d12src);
|
||||||
status = ID3D12Device_OpenSharedHandle(*this->device,
|
status = ID3D12Device_OpenSharedHandle(*this->device,
|
||||||
handle, &IID_ID3D12Resource, (void **)&this->d12src);
|
handle, &IID_ID3D12Resource, (void **)d12src);
|
||||||
|
|
||||||
CloseHandle(handle);
|
CloseHandle(handle);
|
||||||
|
|
||||||
@ -404,7 +405,7 @@ static bool d3d12_preCopy(ID3D11Texture2D * src, unsigned textureIndex)
|
|||||||
{
|
{
|
||||||
struct SharedCache *cache = &this->sharedCache[this->sharedCacheCount++];
|
struct SharedCache *cache = &this->sharedCache[this->sharedCacheCount++];
|
||||||
cache->tex = src;
|
cache->tex = src;
|
||||||
*comRef_newGlobal(&cache->d12src) = (IUnknown *)this->d12src;
|
comRef_toGlobal(cache->d12src, d12src);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user