Skip to content
Snippets Groups Projects
Commit 59226e36 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard
Browse files

wined3d: Don't clear the GL context if it's not the one being destroyed by...

wined3d: Don't clear the GL context if it's not the one being destroyed by context_destroy_gl_resources().

The previous code clears the GL context if the context being destroyed is
not valid, even though the current one is some arbitrary, unrelated context.
parent 75d53c9a
No related branches found
No related tags found
No related merge requests found
......@@ -888,10 +888,10 @@ static void context_destroy_gl_resources(struct wined3d_context *context)
restore_dc = wglGetCurrentDC();
restore_pf = GetPixelFormat(restore_dc);
if (context->valid && restore_ctx != context->glCtx)
context_set_gl_context(context);
else
if (restore_ctx == context->glCtx)
restore_ctx = NULL;
else if (context->valid)
context_set_gl_context(context);
LIST_FOR_EACH_ENTRY(occlusion_query, &context->occlusion_queries, struct wined3d_occlusion_query, entry)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment