Various: Fix coverity reported issues.

This commit is contained in:
treeston
2016-10-04 13:49:05 +02:00
parent 9638c11453
commit 84cf239fda
5 changed files with 9 additions and 53 deletions

View File

@@ -1641,6 +1641,8 @@ bool ScriptMgr::CanSpawn(ObjectGuid::LowType spawnId, uint32 entry, CreatureTemp
ASSERT(actTemplate);
CreatureTemplate const* baseTemplate = sObjectMgr->GetCreatureTemplate(entry);
if (!baseTemplate)
baseTemplate = actTemplate;
GET_SCRIPT_RET(CreatureScript, baseTemplate->ScriptID, tmpscript, true);
return tmpscript->CanSpawn(spawnId, entry, baseTemplate, actTemplate, cData, map);
}