Rico Schüller : wined3d: Don't call wglMakeCurrent( NULL, NULL) in context_set_current() if the current context is NULL.

Alexandre Julliard julliard at winehq.org
Tue Sep 22 13:56:28 CDT 2009


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

Author: Rico Schüller <kgbricola at web.de>
Date:   Sat Sep 19 15:52:18 2009 +0200

wined3d: Don't call wglMakeCurrent(NULL, NULL) in context_set_current() if the current context is NULL.

---

 dlls/wined3d/context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index c4cd436..28cd4a0 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -762,7 +762,7 @@ BOOL context_set_current(struct wined3d_context *ctx)
         }
         ctx->current = 1;
     }
-    else
+    else if(pwglGetCurrentContext())
     {
         TRACE("Clearing current D3D context.\n");
         if (!pwglMakeCurrent(NULL, NULL))




More information about the wine-cvs mailing list