diff options
author | Axel Davy <[email protected]> | 2018-11-25 14:37:53 +0100 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2018-12-25 17:58:05 +0100 |
commit | 8689dcba7b6988c4973177861cb2eb9b1b6913e2 (patch) | |
tree | b61aeb67e14ffd84ece12c0d0179b5d9bc8a14de /src | |
parent | 14e04a2011c2ed6df2b1f006487d81f9ff31cfcf (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]
(cherry picked from commit f91f748fabd7fec8f571124df23296c07102a983)
Diffstat (limited to 'src')
-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); } |