From a5c2570dc5a94dae8e50e0f8cd714b928aed695c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Fri, 20 Feb 2009 11:35:46 +0000 Subject: [PATCH] wgl: Prevent null pointer reference. --- src/gallium/state_trackers/wgl/shared/stw_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/state_trackers/wgl/shared/stw_context.c b/src/gallium/state_trackers/wgl/shared/stw_context.c index 0b996d788f9..1377fb1ec81 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_context.c +++ b/src/gallium/state_trackers/wgl/shared/stw_context.c @@ -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); -- 2.30.2