diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a1c6a5d272d..e92fcfad94f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -15213,8 +15213,8 @@ Unit *Unit::GetVehicleBase() const Creature *Unit::GetVehicleCreatureBase() const { Unit *veh = GetVehicleBase(); - if (veh->GetTypeId() == TYPEID_UNIT) - return (Creature*)veh; + if (veh && veh->GetTypeId() == TYPEID_UNIT) + return dynamic_cast(veh); return NULL; }