[PATCH 4/7] wined3d: Call context_destroy() directly if context is not associated with swapchain.
Józef Kucia
jkucia at codeweavers.com
Wed Oct 5 04:17:06 CDT 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/wined3d/device.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f2dfac7..90d0008 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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);
--
2.7.3
More information about the wine-patches
mailing list