1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

ERM parser won't crash when there is no Data/s folder (addressing issue #717)

This commit is contained in:
Michał W. Urbańczyk 2011-03-20 16:45:18 +00:00
parent bc51c0006f
commit 07ea131c97

View File

@ -57,6 +57,11 @@ DLL_EXPORT void initDLL(CConsoleHandler *Console, std::ostream *Logfile)
using namespace boost::filesystem;
//parser checking
if(!exists("./Data/s/"))
{
tlog3 << "Warning: Folder ./Data/s/ doesn't exist!\n";
return;
}
directory_iterator enddir;
for (directory_iterator dir(DATA_DIR "/Data/s"); dir!=enddir; dir++)
{