Core/Unit: Fix crash when exiting a vehicle
Ref #25649 (cherry picked from commit b84b92506354fc37017cb687aac263218265cf06)
This commit is contained in:
@@ -12029,6 +12029,12 @@ void Unit::_ExitVehicle(Position const* exitPosition)
|
||||
VehicleSeatAddon const* seatAddon = m_vehicle->GetSeatAddonForSeatOfPassenger(this);
|
||||
Vehicle* vehicle = m_vehicle->RemovePassenger(this);
|
||||
|
||||
if (!vehicle)
|
||||
{
|
||||
TC_LOG_ERROR("entities.vehicle", "RemovePassenger() couldn't remove current unit from vehicle. Debug info: %s", GetDebugInfo().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Player* player = ToPlayer();
|
||||
|
||||
// If the player is on mounted duel and exits the mount, he should immediatly lose the duel
|
||||
|
||||
Reference in New Issue
Block a user