diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-09 17:14:09 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-09 17:14:09 +0300 |
commit | b000d846fc4eb83b0c2e870b76c448f9f1cd2cd1 (patch) | |
tree | c0abd7197d693994db87f4663ccceb590541963a | |
parent | a11ccb96a4130548aea8153b90b1af077f145fd9 (diff) |
Fix potential FMODEX crash on exit
-rw-r--r-- | indra/llaudio/llaudioengine_fmodex.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp index 7e65a05e48..5c3f52b201 100644 --- a/indra/llaudio/llaudioengine_fmodex.cpp +++ b/indra/llaudio/llaudioengine_fmodex.cpp @@ -758,10 +758,11 @@ FMOD_RESULT F_CALLBACK windCallback(FMOD_DSP_STATE *dsp_state, float *originalbu FMOD::DSP *thisdsp = (FMOD::DSP *)dsp_state->instance; thisdsp->getUserData((void **)&windgen); - S32 channels, configwidth, configheight; - thisdsp->getInfo(0, 0, &channels, &configwidth, &configheight); - - windgen->windGenerate((LLAudioEngine_FMODEX::MIXBUFFERFORMAT *)newbuffer, length); + + if (windgen) + { + windgen->windGenerate((LLAudioEngine_FMODEX::MIXBUFFERFORMAT *)newbuffer, length); + } return FMOD_OK; } |