Browse Source

fixed memory leak

mateuszb 17 years ago
parent
commit
7bb67cd711
1 changed files with 1 additions and 0 deletions
  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);
 	}
 }