summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-11 11:13:03 +0100
committerSergeanur <s.anureev@yandex.ua>2021-02-11 11:13:03 +0100
commit28f9160bca304daf390f9b4dd68cb96d135e4f51 (patch)
tree1de8ff9e5a13d8aa1df2a88a4efcd9b9a602a4a0 /src/audio
parentstartproject now depends on librw (diff)
downloadre3-28f9160bca304daf390f9b4dd68cb96d135e4f51.tar
re3-28f9160bca304daf390f9b4dd68cb96d135e4f51.tar.gz
re3-28f9160bca304daf390f9b4dd68cb96d135e4f51.tar.bz2
re3-28f9160bca304daf390f9b4dd68cb96d135e4f51.tar.lz
re3-28f9160bca304daf390f9b4dd68cb96d135e4f51.tar.xz
re3-28f9160bca304daf390f9b4dd68cb96d135e4f51.tar.zst
re3-28f9160bca304daf390f9b4dd68cb96d135e4f51.zip
Diffstat (limited to 'src/audio')
-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);