[PATCH 5/7] wined3d: Don't try to cleanup an invalid context.

Matteo Bruni mbruni at codeweavers.com
Thu Dec 3 10:58:57 CST 2020


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49817
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
In particular, if switching away from a destroyed context fails we
call wined3d_context_gl_set_current(NULL) which will attempt to clear
the current context again, recursively.

 dlls/wined3d/context_gl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index eb0bd4a314f..f2129c580e7 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -1542,7 +1542,7 @@ BOOL wined3d_context_gl_set_current(struct wined3d_context_gl *context_gl)
         return TRUE;
     }
 
-    if (old)
+    if (old && old->valid)
     {
         if (old->c.destroyed)
         {
-- 
2.26.2




More information about the wine-devel mailing list