wined3d: Check for NULL before context_release (Coverity).

This commit is contained in:
Marcus Meissner 2009-11-01 16:05:19 +01:00 committed by Alexandre Julliard
parent 3ea9ccca85
commit 9f8a73ab96
1 changed files with 1 additions and 1 deletions

View File

@ -4983,7 +4983,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
mem = HeapAlloc(GetProcessHeap(), 0, outpitch * height);
if(!mem) {
ERR("Out of memory %d, %d!\n", outpitch, height);
context_release(context);
if (context) context_release(context);
return WINED3DERR_OUTOFVIDEOMEMORY;
}
d3dfmt_convert_surface(This->resource.allocatedMemory, mem, pitch, width, height, outpitch, convert, This);