Explorar o código

fixed memory leak

mateuszb %!s(int64=17) %!d(string=hai) anos
pai
achega
7bb67cd711
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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);
 	}
 }