mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
d3d9: Add some missing locking to IDirect3DDevice9Impl_EndStateBlock().
Found by Michael Stefaniuc & Coccinelle.
This commit is contained in:
parent
14b063a14f
commit
41a76b958d
@ -1551,7 +1551,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(IDirect3DDevice9Ex *ifa
|
||||
if (!object)
|
||||
{
|
||||
ERR("Failed to allocate stateblock memory.\n");
|
||||
wined3d_mutex_lock();
|
||||
IWineD3DStateBlock_Release(wined3d_stateblock);
|
||||
wined3d_mutex_unlock();
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@ -1559,7 +1561,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(IDirect3DDevice9Ex *ifa
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize stateblock, hr %#x.\n", hr);
|
||||
wined3d_mutex_lock();
|
||||
IWineD3DStateBlock_Release(wined3d_stateblock);
|
||||
wined3d_mutex_unlock();
|
||||
HeapFree(GetProcessHeap(), 0, object);
|
||||
return hr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user