diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-28 13:33:09 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-28 13:33:09 +0100 |
commit | 7fd6cd9af31a6b02564359f820d478ceb970fc7d (patch) | |
tree | 27fb226b252e7c64653c670e1d0831ce19bcb725 /src/gallium/winsys/xlib | |
parent | 44a7bd0019b9af9ff01336df0aa6eb206f5dc2e9 (diff) | |
parent | b7b9ce0f8677993c3cd5376add72a684a5653341 (diff) |
Merge branch 'gallium-vertex-linear' into gallium-tex-surfaces
Diffstat (limited to 'src/gallium/winsys/xlib')
-rw-r--r-- | src/gallium/winsys/xlib/xm_api.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/winsys/xlib/xm_api.c b/src/gallium/winsys/xlib/xm_api.c index 26b722f343..8a32c54349 100644 --- a/src/gallium/winsys/xlib/xm_api.c +++ b/src/gallium/winsys/xlib/xm_api.c @@ -797,8 +797,14 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) pipe = xmesa_create_i965simple(xmesa_get_pipe_winsys_aub(v)); } + if (pipe == NULL) + goto fail; + c->st = st_create_context(pipe, &v->mesa_visual, share_list ? share_list->st : NULL); + if (c->st == NULL) + goto fail; + mesaCtx = c->st->ctx; c->st->ctx->DriverCtx = c; @@ -818,6 +824,14 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) #endif return c; + + fail: + if (c->st) + st_destroy_context(c->st); + if (pipe) + pipe->destroy(pipe); + FREE(c); + return NULL; } |