From 6bb2d5d242d6385697a6be75a200e5d7d9f1c6c5 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 8 Nov 2009 09:16:22 +0100 Subject: [PATCH] d3d8: Removed superflous NULL checks (Coverity). --- dlls/d3d8/directx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index efcdbd6bf79..e5ecc753c5d 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c @@ -450,16 +450,12 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapte err: *ppReturnedDeviceInterface = NULL; - if(!object) return hr; HeapFree(GetProcessHeap(), 0, object->decls); - if(object->WineD3DDevice) { - wined3d_mutex_lock(); - IWineD3DDevice_Uninit3D(object->WineD3DDevice, D3D8CB_DestroySwapChain); - IWineD3DDevice_Release(object->WineD3DDevice); - wined3d_mutex_unlock(); - } + wined3d_mutex_lock(); + IWineD3DDevice_Uninit3D(object->WineD3DDevice, D3D8CB_DestroySwapChain); + IWineD3DDevice_Release(object->WineD3DDevice); + wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, object); - return hr; }