check for non-nill pwc in WMesaMakeCurrent(), bug 7585
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 21 Jul 2006 19:52:59 +0000 (19:52 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 21 Jul 2006 19:52:59 +0000 (19:52 +0000)
src/mesa/drivers/windows/gdi/wmesa.c

index 8e861da5081b9c9e76325f10136cf9b243cf70d2..8dbd6f836a555582b072f4ff5f1d0dbbd50289f5 100644 (file)
@@ -1321,7 +1321,7 @@ void WMesaMakeCurrent(WMesaContext c, HDC hdc)
         /* return if already current */
         GET_CURRENT_CONTEXT(ctx);
         WMesaContext pwc = wmesa_context(ctx);
-        if (c == pwc && pwc->hDC == hdc)
+        if (pwc && c == pwc && pwc->hDC == hdc)
             return;
     }