Fix memory leak when exporting png texture via stb

This commit is contained in:
Wojtek Figat
2023-04-13 11:21:15 +02:00
parent 8a44ea5a99
commit a379c551cb

View File

@@ -263,6 +263,7 @@ bool TextureTool::ExportTextureStb(ImageType type, const StringView& path, const
if (ptr)
{
file->WriteBytes(ptr, ptrSize);
STBIW_FREE(ptr);
result = 0;
}
else