Fixed memory leak.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6000 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2010-09-14 06:05:48 +00:00
parent a0ce44d326
commit 143ee6d455

View File

@@ -628,11 +628,12 @@ void FileManager::listFiles(std::set<std::string>& result, const std::string& di
for(int n=0; n<(int)files->getFileCount(); n++)
{
//printf("---- Entry : %s \n", (make_full_path ? path+"/"+ files->getFileName(n) : files->getFileName(n)).c_str());
result.insert(make_full_path ? path+"/"+ files->getFileName(n).c_str() : files->getFileName(n).c_str());
result.insert(make_full_path ? path+"/"+ files->getFileName(n).c_str()
: files->getFileName(n).c_str() );
}
m_file_system->changeWorkingDirectoryTo( previous_cwd.c_str() );
files->drop();
} // listFiles
//-----------------------------------------------------------------------------