summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/wgl
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-02-10 18:21:41 +0000
committerKeith Whitwell <[email protected]>2009-02-10 19:23:06 +0000
commitf54149a3a3dde8056a8db9b9ac7cef32885946d7 (patch)
treedbd282359b1713376f3c2b824912ea9338f7ffb1 /src/gallium/state_trackers/wgl
parent9c9ba66fbae8089e9423f6b09ad1091cccf9b006 (diff)
wgl: return before locking if stw_icd is NULL
Diffstat (limited to 'src/gallium/state_trackers/wgl')
-rw-r--r--src/gallium/state_trackers/wgl/icd/stw_icd.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/wgl/icd/stw_icd.c b/src/gallium/state_trackers/wgl/icd/stw_icd.c
index e4f3c669e20..1aa4b8a6e22 100644
--- a/src/gallium/state_trackers/wgl/icd/stw_icd.c
+++ b/src/gallium/state_trackers/wgl/icd/stw_icd.c
@@ -76,7 +76,7 @@ stw_icd_cleanup(void)
{
int i;
- if(!stw_icd)
+ if (!stw_icd)
return;
pipe_mutex_lock( stw_icd->mutex );
@@ -115,6 +115,9 @@ DrvCopyContext(
{
BOOL ret = FALSE;
+ if (!stw_icd)
+ return FALSE;
+
pipe_mutex_lock( stw_icd->mutex );
{
struct stw_context *src = lookup_context( stw_icd, dhrcSource );
@@ -136,7 +139,10 @@ DrvCreateLayerContext(
HDC hdc,
INT iLayerPlane )
{
- DHGLRC handle = 0;;
+ DHGLRC handle = 0;
+
+ if (!stw_icd)
+ return handle;
pipe_mutex_lock( stw_icd->mutex );
{
@@ -179,6 +185,9 @@ DrvDeleteContext(
{
BOOL ret = FALSE;
+ if (!stw_icd)
+ return ret;
+
pipe_mutex_lock( stw_icd->mutex );
{
struct stw_context *ctx;
@@ -273,6 +282,9 @@ DrvReleaseContext(
{
BOOL ret = FALSE;
+ if (!stw_icd)
+ return ret;
+
pipe_mutex_lock( stw_icd->mutex );
{
struct stw_context *ctx;
@@ -661,6 +673,9 @@ DrvSetContext(
{
PGLCLTPROCTABLE result = NULL;
+ if (!stw_icd)
+ return result;
+
pipe_mutex_lock( stw_icd->mutex );
{
struct stw_context *ctx;