mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
fix(core): Null check the helpers (#11476)
* fix (core): move helper * Update Spell.cpp * Update Unit.cpp
This commit is contained in:
@@ -19154,7 +19154,10 @@ void Unit::ExitVehicle(Position const* /*exitPosition*/)
|
||||
return;
|
||||
|
||||
GetVehicleBase()->RemoveAurasByType(SPELL_AURA_CONTROL_VEHICLE, GetGUID());
|
||||
ToPlayer()->SetCanTeleport(true);
|
||||
if (Player* player = ToPlayer())
|
||||
{
|
||||
player->SetCanTeleport(true);
|
||||
}
|
||||
//! The following call would not even be executed successfully as the
|
||||
//! SPELL_AURA_CONTROL_VEHICLE unapply handler already calls _ExitVehicle without
|
||||
//! specifying an exitposition. The subsequent call below would return on if (!m_vehicle).
|
||||
|
||||
Reference in New Issue
Block a user