diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-03-27 21:43:59 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-03-27 21:43:59 +0100 |
commit | 8c44259fae2980598980a7935a3f3941130a5a10 (patch) | |
tree | 467b1561656e3e0d8b2e90d88b5db2953e7383ea /src/server/game/Globals/ObjectMgr.cpp | |
parent | 30894c2badd08827c3bc8b57d8092d7226545e3b (diff) |
Core/Misc: Fix some static analysis issues
Fix uninitialized values, most of which are false positives, always initialized before being accessed.
Add some asserts and additional NULL checks as sanity checks. Use SpellMgr::EnsureSpellInfo() if the spell id is valid and always supposed to return a valid not-NULL SpellInfo* .
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 2a3a79905fb..8784e2ca4e7 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1442,6 +1442,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow) return false; const CreatureData* master = GetCreatureData(guidLow); + ASSERT(master); uint64 guid = MAKE_NEW_GUID(guidLow, master->id, HIGHGUID_UNIT); if (!linkedGuidLow) // we're removing the linking |