mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01: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