From b57323a61b879ca21f3443bd839e742c3bd82292 Mon Sep 17 00:00:00 2001 From: Anatoly Lyutin Date: Tue, 29 Apr 2008 16:02:25 +0400 Subject: [PATCH] wined3d: Guarded to call invalid pointer --- dlls/wined3d/context.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index f185c33750..3592dd42c5 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -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; -- 2.33.8