wined3d: Call context_destroy() directly if context is not associated with swapchain.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-10-05 11:17:06 +02:00 committed by Alexandre Julliard
parent 6f7e0d3dba
commit d90075b0bf
1 changed files with 4 additions and 1 deletions

View File

@ -4570,7 +4570,10 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
while (device->context_count)
{
swapchain_destroy_contexts(device->contexts[0]->swapchain);
if (device->contexts[0]->swapchain)
swapchain_destroy_contexts(device->contexts[0]->swapchain);
else
context_destroy(device, device->contexts[0]);
}
HeapFree(GetProcessHeap(), 0, swapchain->context);