diff options
author | Marek Olšák <[email protected]> | 2020-02-12 17:15:34 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2020-03-09 21:26:55 -0400 |
commit | 040a7117c3b404f82a39cf7b2b232a2149ddfeec (patch) | |
tree | ec26a6702897624bb54402d923778dc9a5e08d9c /src/mesa | |
parent | 7b0e043d486d06a17329b38f41a8e3703c85d356 (diff) |
st/mesa: fix a possible crash with selection and feedback modes
The index bounds are always valid without an index buffer, but they won't be.
Reviewed-by: Dave Airlie <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3986>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3986>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_draw_feedback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c index 44b7b1e8547..47e43f856d5 100644 --- a/src/mesa/state_tracker/st_draw_feedback.c +++ b/src/mesa/state_tracker/st_draw_feedback.c @@ -134,7 +134,7 @@ st_feedback_draw_vbo(struct gl_context *ctx, st_validate_state(st, ST_PIPELINE_RENDER); - if (!index_bounds_valid) + if (ib && !index_bounds_valid) vbo_get_minmax_indices(ctx, prims, ib, &min_index, &max_index, nr_prims); /* must get these after state validation! */ |