etnaviv: Don't try to use the index buffer if size is zero
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Fri, 19 May 2017 10:40:44 +0000 (12:40 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Tue, 30 May 2017 09:45:10 +0000 (11:45 +0200)
commit106b2786b66d1400899718ba98ce1d5311b8e712
tree30cc73edd6f5e51963c724ebac910e29e56dad94
parentd529d5ff16c66aee3d27252e6478f9f97bd6012d
etnaviv: Don't try to use the index buffer if size is zero

If info->index_size is zero, info->index will point to uninitialized
memory.

Fatal signal 11 (SIGSEGV), code 2, fault addr 0xab5d07a3 in tid 20456 (surfaceflinger)

lst: Remove useless indexbuf conditional in the index_size != 0 case.

Fixes: 330d0607ed60 ("gallium: remove pipe_index_buffer and set_index_buffer")
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
src/gallium/drivers/etnaviv/etnaviv_context.c