Commit 7fe3ab5a authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Don't touch "ppSurface" on failure in IWineD3DDeviceImpl_CreateSurface().

I originally kept these when adding surface_init() in 5f581975 because the original code had them on most error paths. However, this actually broke ddraw because it assumed we don't touch "ppSurface" on errors. Just remove these since they're useless anyway.
parent aa305c4a
......@@ -640,7 +640,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UI
if (!object)
{
ERR("Failed to allocate surface memory.\n");
*ppSurface = NULL;
return WINED3DERR_OUTOFVIDEOMEMORY;
}
......@@ -650,7 +649,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UI
{
WARN("Failed to initialize surface, returning %#x.\n", hr);
HeapFree(GetProcessHeap(), 0, object);
*ppSurface = NULL;
return hr;
}
......
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