From: José Fonseca Date: Fri, 20 Feb 2009 11:35:46 +0000 (+0000) Subject: wgl: Prevent null pointer reference. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a5c2570dc5a94dae8e50e0f8cd714b928aed695c;p=mesa.git wgl: Prevent null pointer reference. --- 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);