Index: /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c	(revision 22595)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c	(revision 22596)
@@ -782,4 +782,6 @@
         {
             ERR("Failed to clear current GL context.\n");
+            /*In case of failure, wglMakeCurrent makes current GLRC not current anyway.*/
+            TlsSetValue(wined3d_context_tls_idx, NULL);
             return FALSE;
         }
