Commit 9f8a73ab authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

wined3d: Check for NULL before context_release (Coverity).

parent 3ea9ccca
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment