diff options
author | Brian Paul <brianp@vmware.com> | 2013-03-06 12:08:17 -0700 |
---|---|---|
committer | Andreas Boll <andreas.boll.dev@gmail.com> | 2013-04-17 12:53:55 +0200 |
commit | ee877de37c5d21286490f018ea891009fefcdd21 (patch) | |
tree | fe9682c01db4c4b03e64f145f82ff702d4eafca0 | |
parent | b41b2ed02a1214927d7f06bc89fb8167c0f37240 (diff) |
vbo: fix crash found with shared display lists
This fixes a crash when a display list is created in one context
but executed from a second one. The vbo_save_context::vertex_store
memeber will be NULL if we never created a display list with the
context. Just check for that before dereferencing the pointer.
Fixes http://bugzilla.redhat.com/show_bug.cgi?id=918661
Note: This is a candidate for the stable branches.
(cherry picked from commit c2665aacdd14beec9580246736c602e3ff04d7ae)
-rw-r--r-- | src/mesa/vbo/vbo_save_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index 8e70dbd0e9..a2b65a1d31 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -261,7 +261,7 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) struct vbo_save_context *save = &vbo_context(ctx)->save; GLboolean remap_vertex_store = GL_FALSE; - if (save->vertex_store->buffer) { + if (save->vertex_store && save->vertex_store->buffer) { /* The vertex store is currently mapped but we're about to replay * a display list. This can happen when a nested display list is * being build with GL_COMPILE_AND_EXECUTE. |