1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

"More stable" opening AI.

This commit is contained in:
Michał W. Urbańczyk
2013-01-20 12:06:49 +00:00
parent 0e826915ed
commit 5b919d88eb
3 changed files with 23 additions and 10 deletions

View File

@@ -51,6 +51,12 @@ rett * createAny(std::string dllname, std::string methodName)
tlog1 << "Cannot open dynamic library ("<<dllname<<"). Throwing..."<<std::endl;
throw std::runtime_error("Cannot open dynamic library");
}
else if(!getName || !getAI)
{
tlog1 << dllname << " does not export method " << methodName << std::endl;
FreeLibrary(dll);
throw std::runtime_error("Cannot find method " + methodName);
}
getName(temp);
tlog0 << "Loaded " << temp << std::endl;