Mesa (master): wgl: Prevent null pointer reference.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Feb 20 03:54:26 PST 2009


Module: Mesa
Branch: master
Commit: a5c2570dc5a94dae8e50e0f8cd714b928aed695c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a5c2570dc5a94dae8e50e0f8cd714b928aed695c

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Feb 20 11:35:46 2009 +0000

wgl: Prevent null pointer reference.

---

 .../state_trackers/wgl/shared/stw_context.c        |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/shared/stw_context.c b/src/gallium/state_trackers/wgl/shared/stw_context.c
index 0b996d7..1377fb1 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);



More information about the mesa-commit mailing list