From ffa2f9986cc2eb1f9a6c6691e9e72eba19d20711 Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Mon, 25 Dec 2023 06:48:57 -0800 Subject: [PATCH] AssetManager: fix deleting no file (#1358) --- dCommon/dClient/AssetManager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dCommon/dClient/AssetManager.h b/dCommon/dClient/AssetManager.h index 7e36b4b5..2116f223 100644 --- a/dCommon/dClient/AssetManager.h +++ b/dCommon/dClient/AssetManager.h @@ -26,7 +26,7 @@ struct AssetMemoryBuffer : std::streambuf { } ~AssetMemoryBuffer() { - free(m_Base); + if (m_Success) free(m_Base); } pos_type seekpos(pos_type sp, std::ios_base::openmode which) override {