From 67e988a06c8ff5896da9df7ce1c7fc118352c8a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 10 Feb 2009 11:50:54 +0000 Subject: [PATCH] wgl: Fix null pointer reference. --- src/gallium/state_trackers/wgl/icd/stw_icd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/state_trackers/wgl/icd/stw_icd.c b/src/gallium/state_trackers/wgl/icd/stw_icd.c index 5c78c19f926..8fa9f4e667f 100644 --- a/src/gallium/state_trackers/wgl/icd/stw_icd.c +++ b/src/gallium/state_trackers/wgl/icd/stw_icd.c @@ -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; } -- 2.30.2