Commit 2889b42a authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Cleanup properly if creating the context array fails in CreateAdditionalSwapChain().

parent 2bb7aa72
......@@ -1550,8 +1550,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
/** FIXME: Handle stencil appropriately via EnableAutoDepthStencil / AutoDepthStencilFormat **/
object->context = HeapAlloc(GetProcessHeap(), 0, sizeof(object->context));
if(!object->context)
return E_OUTOFMEMORY;
if(!object->context) {
ERR("Failed to create the context array\n");
hr = E_OUTOFMEMORY;
goto error;
}
object->num_contexts = 1;
if(surface_type == SURFACE_OPENGL) {
......
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