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

This commit is contained in:
Henri Verbeet 2008-10-15 13:35:31 +02:00 committed by Alexandre Julliard
parent 2bb7aa7252
commit 2889b42a3f
1 changed files with 5 additions and 2 deletions

View File

@ -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) {