Core/Scripts: fixed memory leak caused by unassigned scripts in db

This commit is contained in:
joschiwald
2014-09-29 19:03:04 +02:00
parent 35b267e7f7
commit c34af1d60b

View File

@@ -102,9 +102,10 @@ class ScriptRegistry
else
{
// The script uses a script name from database, but isn't assigned to anything.
if (script->GetName().find("Smart") == std::string::npos)
TC_LOG_ERROR("sql.sql", "Script named '%s' does not have a script name assigned in database.",
script->GetName().c_str());
TC_LOG_ERROR("sql.sql", "Script named '%s' does not have a script name assigned in database.", script->GetName().c_str());
delete script;
return;
}
}
else