[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    wined3d/context: Fix an oops/crash in context_destroy_gl_resources().
From:       Adam Martinson <amartinson () codeweavers ! com>
Date:       2011-04-29 21:48:25
Message-ID: 4DBB3229.9040808 () codeweavers ! com
[Download RAW message or body]

Introduced by 96b150929b0791c7c30ade49d55cedf2d608537e.
---
  dlls/wined3d/context.c |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)



["0001-wined3d-context-Fix-an-oops-crash-in-context_destroy.patch" (text/x-patch)]

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 00a649b..9fecddd 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -989,7 +989,10 @@ static void context_destroy_gl_resources(struct wined3d_context *context)
 
         if (gl_info->supported[ARB_SYNC])
         {
-            if (event_query->object.sync) GL_EXTCALL(glDeleteSync(event_query->object.sync));
+            for (i = 0; i < context->free_event_query_count; ++i)
+            {
+                GL_EXTCALL(glDeleteSync(context->free_event_queries[i].sync));
+            }
         }
         else if (gl_info->supported[APPLE_FENCE])
         {





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic