summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-04-21 16:11:27 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-04-21 16:11:27 +0000
commitc45b7364dab6c3daebc1f1d8d11124af4129074a (patch)
tree7b887833cbe2c9182a327fe24b82362d487dba93 /src/mesa/drivers/x11
parentf693b1dc2ef78aab08e0aef40d1ee77b89533ef0 (diff)
check return values of _swrast_CreateContext, etc
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/xm_api.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index da2371eb7c..bdf6f1d428 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1677,10 +1677,14 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
/* Initialize the software rasterizer and helper modules.
*/
- _swrast_CreateContext( mesaCtx );
- _ac_CreateContext( mesaCtx );
- _tnl_CreateContext( mesaCtx );
- _swsetup_CreateContext( mesaCtx );
+ if (!_swrast_CreateContext( mesaCtx ) ||
+ !_ac_CreateContext( mesaCtx ) ||
+ !_tnl_CreateContext( mesaCtx ) ||
+ !_swsetup_CreateContext( mesaCtx )) {
+ _mesa_free_context_data(&c->mesa);
+ _mesa_free(c);
+ return NULL;
+ }
/* tnl setup */
tnl = TNL_CONTEXT(mesaCtx);