mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 04:02:53 -04:00
Core/Scripts: fixed memory leak caused by unassigned scripts in db
This commit is contained in:
@@ -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