mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 17:50:11 +01:00
mesa/main: Prevent sefgault on glGetIntegerv(GL_ATOMIC_COUNTER_BUFFER_BINDING).
A recent ApiTrace change, that tries to dump more buffer state causes Mesa from my distro (10.1.4) to segfaults here. I haven't actually confirm this fixes it (I can't repro on master), but it seems a good idea to be defensive here anyway. Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
8873120f9f
commit
eb58aa9cf0
1 changed files with 5 additions and 1 deletions
|
|
@ -1005,7 +1005,11 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
|
|||
break;
|
||||
/* GL_ARB_shader_atomic_counters */
|
||||
case GL_ATOMIC_COUNTER_BUFFER_BINDING:
|
||||
v->value_int = ctx->AtomicBuffer->Name;
|
||||
if (ctx->AtomicBuffer) {
|
||||
v->value_int = ctx->AtomicBuffer->Name;
|
||||
} else {
|
||||
v->value_int = 0;
|
||||
}
|
||||
break;
|
||||
/* GL_ARB_draw_indirect */
|
||||
case GL_DRAW_INDIRECT_BUFFER_BINDING:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue