From 43a6be4b10da0c5e1e45e97d1130af3b93afaa71 Mon Sep 17 00:00:00 2001 From: Anubisss Date: Thu, 18 Feb 2010 21:17:19 +0100 Subject: Fix a crash in generic_vehicleAI_toc5AI. gdb log: #3 0x0000000000ce25c9 in Vehicle::GetPassenger (this=0x0, seatId=0 '\0') #4 0x0000000000f10820 in generic_vehicleAI_toc5AI::UpdateAI ( this=0x7f1c123c3000, uiDiff=118) --HG-- branch : trunk --- .../trial_of_the_champion/boss_grand_champions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 9d745c8775a..6fc53263ed1 100644 --- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -261,6 +261,12 @@ struct generic_vehicleAI_toc5AI : public npc_escortAI //dosen't work at all if (uiShieldBreakerTimer <= uiDiff) { + if (!pVehicle) + { + pVehicle = m_creature->GetVehicleKit(); + return; + } + if (Unit* pPassenger = pVehicle->GetPassenger(SEAT_ID_0)) { Map::PlayerList const& players = m_creature->GetMap()->GetPlayers(); -- cgit v1.2.3