Fixed some additional found nullptrs

This commit is contained in:
Antz 2016-09-21 20:49:06 +01:00 committed by Antz
parent 2e925eddd5
commit 2d960a4b1c
36 changed files with 303 additions and 303 deletions

View file

@ -59,7 +59,7 @@ void MotionMaster::Initialize()
if (m_owner->GetTypeId() == TYPEID_UNIT && !m_owner->hasUnitState(UNIT_STAT_CONTROLLED))
{
MovementGenerator* movement = FactorySelector::selectMovementGenerator((Creature*)m_owner);
push(movement == nullptr ? &si_idleMovement : movement);
push(movement == NULL ? &si_idleMovement : movement);
top()->Initialize(*m_owner);
if (top()->GetMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
(static_cast<WaypointMovementGenerator<Creature>*>(top()))->InitializeWaypointPath(*((Creature*)(m_owner)), 0, PATH_NO_PATH, 0, 0);