st/nine: Fix GenerateMipSubLevels potential crash
authorPatrick Rudolph <siro@das-labor.org>
Tue, 12 May 2015 18:07:09 +0000 (20:07 +0200)
committerAxel Davy <axel.davy@ens.fr>
Fri, 21 Aug 2015 20:21:46 +0000 (22:21 +0200)
commitbb1c2c2aa3b15ee1fdf8b8085cc1ca9f8ef04ed9
treec5b9615c0ef52f2fb33ffd9b5f4b1dde7e6ed7e5
parent3bcab9ba75b24bd6cabcd9d31165ad4c1fe9d75c
st/nine: Fix GenerateMipSubLevels potential crash

For the case of D3DPOOL_MANAGED textures, This->base.resource can be NULL
at the start of the function. In This case, UploadSelf will take care
of the defining. Assign resource after the UploadSelf call
to prevent NULL pointer exception.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
src/gallium/state_trackers/nine/basetexture9.c