swrast: allocate swrast_texture_image::ImageSlices array if needed
authorBrian Paul <brianp@vmware.com>
Wed, 23 Apr 2014 15:49:58 +0000 (09:49 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 24 Apr 2014 14:16:01 +0000 (08:16 -0600)
commit7cc2e2e99d857617178ce01f52ae2a9b04da3275
treeb33c4297ff392224a513df2ad43a0309e49adf2e
parent15c92464df07c5c0bb23a007358c560faeab76a8
swrast: allocate swrast_texture_image::ImageSlices array if needed

Fixes a segmentation fault in conform divzero.c test.
This happens when glTexImage(level, width=0, height=0) is called.  We
don't allocate texture memory in that case so the ImageSlices array
was never allocated.

Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/swrast/s_texture.c