From 8710e76a2d363d7604af950b85e440d460719d15 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 27 Dec 2021 15:47:42 +0100 Subject: [PATCH] - delete voxel models when shutting down --- source/core/rendering/hw_voxels.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/core/rendering/hw_voxels.cpp b/source/core/rendering/hw_voxels.cpp index 9b10f0f7d..fc25640ad 100644 --- a/source/core/rendering/hw_voxels.cpp +++ b/source/core/rendering/hw_voxels.cpp @@ -49,7 +49,11 @@ void voxClear() { for (auto& vox : voxmodels) { - if (vox) delete vox; + if (vox) + { + delete vox->model; + delete vox; + } vox = nullptr; } }