Core/Scripts: fixed memory leak caused by unassigned scripts in db
This commit is contained in:
1 parent
35b267e7f7
commit
c34af1d60b
1 file changed
+4
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user