OSDN Git Service

wgl: Prevent null pointer reference.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 20 Feb 2009 11:35:46 +0000 (11:35 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 20 Feb 2009 11:54:18 +0000 (11:54 +0000)
src/gallium/state_trackers/wgl/shared/stw_context.c

index 0b996d7..1377fb1 100644 (file)
@@ -178,6 +178,9 @@ stw_delete_context(
    struct stw_context *ctx ;
    BOOL ret = FALSE;
    
+   if (!stw_dev)
+      return FALSE;
+
    pipe_mutex_lock( stw_dev->mutex );
 
    ctx = stw_lookup_context(hglrc);