diff options
author | Axel Davy <[email protected]> | 2018-11-25 14:37:53 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2018-12-23 08:14:50 +0100 |
commit | f91f748fabd7fec8f571124df23296c07102a983 (patch) | |
tree | 78590e6dbe13beed6d0b4a64122bb9ca2ed4f944 | |
parent | 1cc8192ad0be52220043d40f2c7ead149d479809 (diff) |
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 <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Cc: [email protected]
-rw-r--r-- | src/gallium/state_trackers/nine/volumetexture9.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/volumetexture9.c b/src/gallium/state_trackers/nine/volumetexture9.c index 5dec4844864..c7191bce688 100644 --- a/src/gallium/state_trackers/nine/volumetexture9.c +++ b/src/gallium/state_trackers/nine/volumetexture9.c @@ -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); } |