diff --git a/core/rend/CustomTexture.cpp b/core/rend/CustomTexture.cpp index 4b02588f9..7a9b8ad07 100644 --- a/core/rend/CustomTexture.cpp +++ b/core/rend/CustomTexture.cpp @@ -55,7 +55,7 @@ void CustomTexture::LoaderThread() texture->ComputeHash(); if (texture->custom_image_data != NULL) { - delete [] texture->custom_image_data; + free(texture->custom_image_data); texture->custom_image_data = NULL; } if (!texture->dirty) diff --git a/core/rend/TexCache.cpp b/core/rend/TexCache.cpp index 8ec17d07b..7840e8210 100644 --- a/core/rend/TexCache.cpp +++ b/core/rend/TexCache.cpp @@ -414,7 +414,7 @@ bool BaseTextureCacheData::Delete() lock_block = nullptr; } - delete[] custom_image_data; + free(custom_image_data); return true; } @@ -735,7 +735,7 @@ void BaseTextureCacheData::CheckCustomTexture() { tex_type = TextureType::_8888; UploadToGPU(custom_width, custom_height, custom_image_data, IsMipmapped(), false); - delete [] custom_image_data; + free(custom_image_data); custom_image_data = NULL; } }