projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed45e8d
)
st/mesa: init winsys buffers list only if context creation succeeds
author
Charmaine Lee
<charmainel@vmware.com>
Wed, 12 Jul 2017 04:55:13 +0000
(21:55 -0700)
committer
Charmaine Lee
<charmainel@vmware.com>
Wed, 12 Jul 2017 05:46:55 +0000
(22:46 -0700)
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>
src/mesa/state_tracker/st_context.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_context.c
b/src/mesa/state_tracker/st_context.c
index 560d94ecd231321752d8ec41dc71720d70637ba3..381ff9dae00d073aab341dbe99014f865450e172 100644
(file)
--- a/
src/mesa/state_tracker/st_context.c
+++ b/
src/mesa/state_tracker/st_context.c
@@
-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;
}