From 6602a9fc48df1859148aadb9bc1223c359e81c96 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 24 Aug 2009 13:45:27 -0500 Subject: *Fix a logical error in IsOnVehicle check. --HG-- branch : trunk --- src/game/Unit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Unit.h b/src/game/Unit.h index c7e2e838212..523b4c19f7a 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1838,7 +1838,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject bool CreateVehicleKit(uint32 id); Vehicle *GetVehicleKit()const { return m_vehicleKit; } Vehicle *GetVehicle() const { return m_vehicle; } - bool IsOnVehicle(const Unit *unit) const { return m_vehicle == unit->GetVehicleKit(); } + bool IsOnVehicle(const Unit *unit) const { return m_vehicle && m_vehicle == unit->GetVehicleKit(); } Unit *GetVehicleBase() const; Creature *GetVehicleCreatureBase() const; float GetTransOffsetX() const { return m_movementInfo.t_x; } -- cgit v1.2.3