From 390be9814025100f2abbe650400a87530ad51d66 Mon Sep 17 00:00:00 2001 From: Johan Mattsson <39247600+mjunix@users.noreply.github.com> Date: Sat, 4 Mar 2023 21:55:39 +0100 Subject: [PATCH] Release memory --- Engine/source/gfx/bitmap/ddsFile.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Engine/source/gfx/bitmap/ddsFile.cpp b/Engine/source/gfx/bitmap/ddsFile.cpp index 3d9c33685..8014a8376 100644 --- a/Engine/source/gfx/bitmap/ddsFile.cpp +++ b/Engine/source/gfx/bitmap/ddsFile.cpp @@ -123,7 +123,7 @@ U32 DDSFile::getSurfaceSize( U32 height, U32 width, U32 mipLevel ) const if(mFlags.test(CompressedData)) { // From the directX docs: - // max(1, width ๗ 4) x max(1, height ๗ 4) x 8(DXT1) or 16(DXT2-5) + // max(1, width รท 4) x max(1, height รท 4) x 8(DXT1) or 16(DXT2-5) U32 sizeMultiple = 0; @@ -178,7 +178,7 @@ U32 DDSFile::getSizeInBytes( GFXFormat format, U32 height, U32 width, U32 mipLev "DDSFile::getSizeInBytes - Must be a Block Compression format!" ); // From the directX docs: - // max(1, width ๗ 4) x max(1, height ๗ 4) x 8(DXT1) or 16(DXT2-5) + // max(1, width รท 4) x max(1, height รท 4) x 8(DXT1) or 16(DXT2-5) U32 sizeMultiple = 0; if ( format == GFXFormatBC1 || format == GFXFormatBC1_SRGB || format == GFXFormatBC4) @@ -744,6 +744,7 @@ DDSFile *DDSFile::createDDSCubemapFileFromGBitmaps(GBitmap **gbmps) GFXFormat fmt = pBitmap->getFormat(); if (fmt != GFXFormatR8G8B8A8 && fmt != GFXFormatR16G16B16A16F) { + delete ret; Con::errorf("createDDSCubemapFileFromGBitmaps: unsupported format"); return NULL; } @@ -807,4 +808,4 @@ DefineEngineFunction( getActiveDDSFiles, S32, (),, "@ingroup Rendering\n" ) { return DDSFile::smActiveCopies; -} \ No newline at end of file +}