wgl: Fix null pointer reference.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 10 Feb 2009 11:50:54 +0000 (11:50 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 10 Feb 2009 11:51:47 +0000 (11:51 +0000)
src/gallium/state_trackers/wgl/icd/stw_icd.c

index 5c78c19f926cacc37b6f0bfdb07388649c3fec90..8fa9f4e667f7027341495f5db730349440c2b714 100644 (file)
@@ -89,6 +89,9 @@ lookup_context( DHGLRC dhglrc )
        dhglrc >= DRV_CONTEXT_MAX)
       return NULL;
 
+   if(!stw_icd)
+      return NULL;
+
    return stw_icd->ctx_array[dhglrc - 1].ctx;
 }