[OPENGL32]
[reactos.git] / dll / opengl / opengl32 / wgl.c
index cb50202..a8547c1 100644 (file)
@@ -696,7 +696,7 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
                 ERR("DrvSetContext failed!\n");
                 /* revert */
                 InterlockedExchange(&ctx->thread_id, 0);
                 ERR("DrvSetContext failed!\n");
                 /* revert */
                 InterlockedExchange(&ctx->thread_id, 0);
-                IntSetCurrentDispatchTable(&StubTable.glDispatchTable);
+                IntSetCurrentDispatchTable(NULL);
                 SetLastError(ERROR_INVALID_PARAMETER);
                 return FALSE;
             }
                 SetLastError(ERROR_INVALID_PARAMETER);
                 return FALSE;
             }
@@ -728,8 +728,7 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
         InterlockedExchange(&old_ctx->thread_id, 0);
         /* Unset it */
         IntMakeCurrent(NULL, NULL, NULL);
         InterlockedExchange(&old_ctx->thread_id, 0);
         /* Unset it */
         IntMakeCurrent(NULL, NULL, NULL);
-        /* Reset the no-op table */
-        set_api_table(&StubTable);
+        IntSetCurrentDispatchTable(NULL);
         /* Test conformance (extreme cases) */
         return hglrc == NULL;
     }
         /* Test conformance (extreme cases) */
         return hglrc == NULL;
     }