summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/audio/AudioLogic.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index c7b26711..7469f579 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -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);