Fix crash when falling from bike while shooting

This commit is contained in:
Sergeanur 2021-02-11 12:13:03 +02:00
parent 84ede57205
commit 28f9160bca
1 changed files with 2 additions and 0 deletions

View File

@ -2970,6 +2970,8 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
int32 sampleIndex;
int32 frequency;
CPed *pPed = params.m_pVehicle->pDriver;
if(!pPed)
break;
if(!pPed->HasWeaponSlot(WEAPONSLOT_SUBMACHINEGUN)) {
sampleIndex = SFX_UZI_LEFT;
frequency = SampleManager.GetSampleBaseFrequency(sampleIndex);