From 009cc4e403f4b6acbc8a8ba47ef985685ae35a06 Mon Sep 17 00:00:00 2001 From: Oliver Stieber Date: Thu, 27 Oct 2005 12:08:00 +0000 Subject: [PATCH] Release the OpenGL context when the device is released. --- dlls/d3d8/device.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 5666317a3f2..b1df7b984e6 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -314,6 +314,12 @@ ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface) { IDirect3DDevice8Impl_CleanRender(iface); IDirect3D8_Release((LPDIRECT3D8) This->direct3d8); IWineD3DDevice_Release(This->WineD3DDevice); + + if (glXGetCurrentContext() == This->glCtx) { + glXMakeCurrent(This->display, None, NULL); + } + glXDestroyContext(This->display, This->glCtx); + HeapFree(GetProcessHeap(), 0, This); } return ref; -- 2.11.4.GIT