Core/Maps: Prevent potential null dereference

- Coverity: 1381663

(cherry picked from commit 82a93e6be95af4419e001a7dbf109b416a109fb6)
This commit is contained in:
r00ty-tc
2021-01-13 22:04:52 +01:00
committed by funjoker
parent 0316ae913e
commit 7a21d02da1
@@ -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