mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
st/mesa: init winsys buffers list only if context creation succeeds
Fixes piglit test crash when context creation fails. v2: As suggested by Brian, move the init to st_create_context_priv() Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
ed45e8db3c
commit
d8f51bfcbf
1 changed files with 3 additions and 3 deletions
|
|
@ -476,6 +476,9 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
|
|||
_mesa_initialize_vbo_vtxfmt(ctx);
|
||||
st_init_driver_flags(st);
|
||||
|
||||
/* Initialize context's winsys buffers list */
|
||||
LIST_INITHEAD(&st->winsys_buffers);
|
||||
|
||||
return st;
|
||||
}
|
||||
|
||||
|
|
@ -576,9 +579,6 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
|
|||
_mesa_destroy_context(ctx);
|
||||
}
|
||||
|
||||
/* Initialize context's winsys buffers list */
|
||||
LIST_INITHEAD(&st->winsys_buffers);
|
||||
|
||||
return st;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue