浏览代码

fixed memory leak

mateuszb 17 年之前
父节点
当前提交
7bb67cd711
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      CAdvmapInterface.cpp

+ 1 - 0
CAdvmapInterface.cpp

@@ -315,6 +315,7 @@ void CTerrainRect::clickLeft(tribool down)
 		//Convert to old format.
 		currentPath = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].second = CGI->pathf->ConvertToOldFormat(p);
 
+		delete p;
 		//currentPath = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].second = CGI->pathf->getPath(bufpos,mp,currentHero,1);
 	}
 }