st/nine: Fix volumetexture dtor on ctor failure
The dtor is called on allocation failure, thus we must check the volumes are allocated before trying to release them. Signed-off-by: Axel Davy <davyaxel0@gmail.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
parent
1cc8192ad0
commit
f91f748fab
|
@ -141,7 +141,8 @@ NineVolumeTexture9_dtor( struct NineVolumeTexture9 *This )
|
|||
|
||||
if (This->volumes) {
|
||||
for (l = 0; l <= This->base.base.info.last_level; ++l)
|
||||
NineUnknown_Destroy(&This->volumes[l]->base);
|
||||
if (This->volumes[l])
|
||||
NineUnknown_Destroy(&This->volumes[l]->base);
|
||||
FREE(This->volumes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue