diff --git a/dlls/winemac.drv/cocoa_opengl.m b/dlls/winemac.drv/cocoa_opengl.m
index ec2b19198c26d0494ff2b22322e4d03b4d4a9075..4694dfdc81bfa32b6f554309da51c836d847b45c 100644
--- a/dlls/winemac.drv/cocoa_opengl.m
+++ b/dlls/winemac.drv/cocoa_opengl.m
@@ -235,7 +235,10 @@ void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v)
         }
 
         if (context)
+        {
             [context removeFromViews:YES];
+            [context makeCurrentContext];
+        }
     }
 
     [pool release];
diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c
index ab79a825bba8680d678dea6ec924f922eebfff86..f0c70481d2caebb7bebee1e2f5979f08648d3e91 100644
--- a/dlls/winemac.drv/opengl.c
+++ b/dlls/winemac.drv/opengl.c
@@ -3057,7 +3057,13 @@ static BOOL macdrv_wglMakeContextCurrentARB(HDC draw_hdc, HDC read_hdc, struct w
         return TRUE;
     }
 
-    if ((hwnd = WindowFromDC(draw_hdc)))
+    if (!draw_hdc && !read_hdc)
+    {
+        context->draw_hwnd = NULL;
+        context->draw_view = NULL;
+        context->draw_pbuffer = NULL;
+    }
+    else if ((hwnd = WindowFromDC(draw_hdc)))
     {
         if (!(data = get_win_data(hwnd)))
         {