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 0b996d788f9596e1c4a0e5dde02c513153ce375a..1377fb1ec810dc5b6559291053902a614d481eb8 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);