=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Call context_destroy() directly if context is not associated with swapchain.

Alexandre Julliard julliard at winehq.org
Thu Oct 6 14:46:53 CDT 2016


Module: wine
Branch: master
Commit: d90075b0bfab02f690e579f42d24e25585453173
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d90075b0bfab02f690e579f42d24e25585453173

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Oct  5 11:17:06 2016 +0200

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

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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);




More information about the wine-cvs mailing list