Skip to content

Commit d77f6f8

Browse files
authored
Fix CVehicleSA::BlowUp crash (#4058)
Fix BlowUp crash
1 parent 40d9ac1 commit d77f6f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Client/game_sa/CVehicleSA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ CDamageManager* CVehicleSA::GetDamageManager()
11231123

11241124
void CVehicleSA::BlowUp(CEntity* pCreator, unsigned long ulUnknown)
11251125
{
1126-
GetVehicleInterface()->BlowUpCar(pCreator->GetInterface(), ulUnknown);
1126+
GetVehicleInterface()->BlowUpCar(pCreator ? pCreator->GetInterface() : nullptr, ulUnknown);
11271127
}
11281128

11291129
void CVehicleSA::FadeOut(bool bFadeOut)

Client/mods/deathmatch/logic/CClientVehicle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ void CClientVehicle::Blow(VehicleBlowFlags blow)
908908
// "Fuck" the car completely, so we don't have weird client-side jumpyness because of differently synced wheel states on clients
909909
FuckCarCompletely(true);
910910

911-
m_pVehicle->BlowUp(NULL, 0);
911+
m_pVehicle->BlowUp(nullptr, 0);
912912

913913
// Blowing up a vehicle will cause an explosion in the original game code, but we have a hook in place,
914914
// which will prevent the explosion and forward the information to the server to relay it to everyone from there.

0 commit comments

Comments
 (0)