wined3d: Guarded to call invalid pointer
authorAnatoly Lyutin <vostok@etersoft.ru>
Tue, 29 Apr 2008 12:02:25 +0000 (16:02 +0400)
committerKonstantin Kondratyuk <kondratyuk@etersoft.ru>
Fri, 2 May 2008 09:34:23 +0000 (13:34 +0400)
dlls/wined3d/context.c

index f185c337506c3c9cc7f8637d063a4ced82fe0a8e..3592dd42c5d50ebc7862b007f17b6aafadb17a8e 100644 (file)
@@ -982,6 +982,12 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
         context = This->activeContext;
     }
 
+    if(!context)
+    {
+        ERR("The context is nil! Return.\n");
+        return;
+    }
+
     /* Activate the opengl context */
     if(context != This->activeContext) {
         BOOL ret;