Core/Maps: Prevent potential null dereference

- Coverity: 1381663

(cherry picked from commit 82a93e6be9)
This commit is contained in:
r00ty-tc
2017-10-25 23:13:04 +01:00
committed by funjoker
parent 0316ae913e
commit 7a21d02da1

View File

@@ -2558,7 +2558,7 @@ void Creature::SaveRespawnTime(uint32 forceDelay, bool savetodb)
}
uint32 thisRespawnTime = forceDelay ? time(NULL) + forceDelay : m_respawnTime;
GetMap()->SaveRespawnTime(SPAWN_TYPE_CREATURE, m_spawnId, GetEntry(), thisRespawnTime, GetMap()->GetZoneId(GetPhaseShift(), GetHomePosition()), Trinity::ComputeGridCoord(GetHomePosition().GetPositionX(), GetHomePosition().GetPositionY()).GetId(), m_creatureData->dbData && savetodb);
GetMap()->SaveRespawnTime(SPAWN_TYPE_CREATURE, m_spawnId, GetEntry(), thisRespawnTime, GetMap()->GetZoneId(GetPhaseShift(), GetHomePosition()), Trinity::ComputeGridCoord(GetHomePosition().GetPositionX(), GetHomePosition().GetPositionY()).GetId(), savetodb && m_creatureData && m_creatureData->dbData);
}
// this should not be called by petAI or