Fix memory leak due to IHardwareTexture forward declaration

This commit is contained in:
Magnus Norddahl 2024-02-19 10:16:36 +01:00 committed by Rachael Alexanderson
parent 6de9d83b81
commit c9612b0cab
No known key found for this signature in database
GPG Key ID: 26A8ACCE97115EE0
1 changed files with 2 additions and 2 deletions

View File

@ -3,9 +3,9 @@
#include "tarray.h"
#include "hw_ihwtexture.h"
#include "palettecontainer.h"
#include "hw_ihwtexture.h" // Note: this cannot be a forward declaration due to the inlined delete statement below.
struct FTextureBuffer;
class IHardwareTexture;
enum ECreateTexBufferFlags
{
@ -34,7 +34,7 @@ private:
void Delete()
{
if (hwTexture) delete hwTexture;
delete hwTexture;
hwTexture = nullptr;
}