diff options
author | Marek Olšák <[email protected]> | 2018-05-14 22:32:33 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-05-15 12:36:27 -0400 |
commit | 3e27b377f2c0e1644c466cdb32872b771300ffda (patch) | |
tree | 2710d129d559a6a072cb343409db4d9039e8e7fb /src/gallium | |
parent | dace6072459c94ff7dbc3a248ceef3d95bd26631 (diff) |
cso: check count == 0 in cso_set_vertex_buffers
The code didn't expect that, leading to crashes.
Fixes: 86d63b53a20a747e "gallium: remove aux_vertex_buffer_slot code"
Tested-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index e3d46f3c8de..2543c5ff61f 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -1147,6 +1147,9 @@ void cso_set_vertex_buffers(struct cso_context *ctx, { struct u_vbuf *vbuf = ctx->vbuf; + if (!count) + return; + if (vbuf) { u_vbuf_set_vertex_buffers(vbuf, start_slot, count, buffers); return; |