From ff75c3ba2d1df54ec5f53da2ce502cfd33c182e0 Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 8 Jul 2012 13:13:21 +0200 Subject: fixed some memory leaks in the map editor --- src/game/editor/io.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/game/editor/io.cpp') diff --git a/src/game/editor/io.cpp b/src/game/editor/io.cpp index 463147e1..529638cf 100644 --- a/src/game/editor/io.cpp +++ b/src/game/editor/io.cpp @@ -391,6 +391,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) } df.AddItem(MAPITEMTYPE_ENVPOINTS, 0, TotalSize, pPoints); + mem_free(pPoints); // finish the data file df.Finish(); @@ -479,6 +480,7 @@ int CEditorMap::Load(class IStorage *pStorage, const char *pFileName, int Storag { *pImg = ImgInfo; pImg->m_TexID = m_pEditor->Graphics()->LoadTextureRaw(ImgInfo.m_Width, ImgInfo.m_Height, ImgInfo.m_Format, ImgInfo.m_pData, CImageInfo::FORMAT_AUTO, 0); + ImgInfo.m_pData = 0; pImg->m_External = 1; } } -- cgit 1.4.1