Commit 274b091c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Free the swapchain context array in swapchain_destroy_contexts().

parent 908010d4
......@@ -4528,7 +4528,7 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
}
}
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
{
struct wined3d_resource *resource, *cursor;
struct wined3d_context *context;
......@@ -4561,9 +4561,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
else
context_destroy(device, device->contexts[0]);
}
HeapFree(GetProcessHeap(), 0, swapchain->context);
swapchain->context = NULL;
}
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
......@@ -4827,7 +4824,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
state_cleanup(&device->state);
if (device->d3d_initialized)
delete_opengl_contexts(device, swapchain);
wined3d_device_delete_opengl_contexts(device);
state_init(&device->state, &device->fb, &device->adapter->gl_info,
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT);
......
......@@ -1136,7 +1136,9 @@ void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain)
{
context_destroy(swapchain->device, swapchain->context[i]);
}
HeapFree(GetProcessHeap(), 0, swapchain->context);
swapchain->num_contexts = 0;
swapchain->context = NULL;
}
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain)
......
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