diff options
author | Jakob Bornecrantz <[email protected]> | 2008-05-28 12:42:42 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2008-05-28 12:42:42 +0200 |
commit | 938d9d596324e411fde5312f2bb65b444c502c37 (patch) | |
tree | f32087f7c61f0827980278a5dae2b32edf534b72 /src/gallium/winsys | |
parent | 5d90f97f48f8ba231d52bb1a4758dd37f81ec8d6 (diff) | |
parent | 7b85ea19de09d4e7e077ca147528e90e52683690 (diff) |
Merge branch 'gallium-vertex-linear' into gallium-0.1
Conflicts:
src/gallium/auxiliary/draw/draw_pt_varray.c
Diffstat (limited to 'src/gallium/winsys')
-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 26b722f3439..8a32c54349b 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; } |