summaryrefslogtreecommitdiff
path: root/indra/llaudio
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-09 16:57:19 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-09 16:57:19 +0300
commit1598a368cd56d9129ce9b9ce6819ec508f4d7253 (patch)
treed78d13a6622fa73d4546b9740eb8ebb41e5f3b02 /indra/llaudio
parentc0ce2565918af03f1dabcb02dedb87c1c447008a (diff)
SL-11445 On exit LLWindGen can be invalid
Diffstat (limited to 'indra/llaudio')
-rw-r--r--indra/llaudio/llaudioengine_fmodstudio.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llaudio/llaudioengine_fmodstudio.cpp b/indra/llaudio/llaudioengine_fmodstudio.cpp
index 49ae01b44d..32d2266fdb 100644
--- a/indra/llaudio/llaudioengine_fmodstudio.cpp
+++ b/indra/llaudio/llaudioengine_fmodstudio.cpp
@@ -721,12 +721,15 @@ FMOD_RESULT F_CALLBACK windCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer,
// outbuffer = the buffer passed from the previous DSP unit.
// length = length in samples at this mix time.
- LLWindGen<LLAudioEngine_FMODSTUDIO::MIXBUFFERFORMAT> *windgen;
+ LLWindGen<LLAudioEngine_FMODSTUDIO::MIXBUFFERFORMAT> *windgen = NULL;
FMOD::DSP *thisdsp = (FMOD::DSP *)dsp_state->instance;
thisdsp->getUserData((void **)&windgen);
- windgen->windGenerate((LLAudioEngine_FMODSTUDIO::MIXBUFFERFORMAT *)outbuffer, length);
+ if (windgen)
+ {
+ windgen->windGenerate((LLAudioEngine_FMODSTUDIO::MIXBUFFERFORMAT *)outbuffer, length);
+ }
return FMOD_OK;
}