From ece61c6c6844cd3f11dc3f6070f57a88f36e9e84 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 12 Nov 2021 09:17:32 +0100 Subject: [PATCH] Update M3DWrapper.cpp --- code/AssetLib/M3D/M3DWrapper.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/AssetLib/M3D/M3DWrapper.cpp b/code/AssetLib/M3D/M3DWrapper.cpp index aa122f5b2..f26912892 100644 --- a/code/AssetLib/M3D/M3DWrapper.cpp +++ b/code/AssetLib/M3D/M3DWrapper.cpp @@ -39,8 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------- */ - -#if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER) || !ASSIMP_BUILD_NO_M3D_IMPORTER +#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER +#if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER) #include "M3DWrapper.h" @@ -141,10 +141,12 @@ unsigned char *M3DWrapper::Save(int quality, int flags, unsigned int &size) { } void M3DWrapper::ClearSave() { - if (saved_output_) + if (saved_output_) { M3D_FREE(saved_output_); + } saved_output_ = nullptr; } } // namespace Assimp #endif +#endif