From b000d846fc4eb83b0c2e870b76c448f9f1cd2cd1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 9 Apr 2020 17:14:09 +0300 Subject: Fix potential FMODEX crash on exit --- indra/llaudio/llaudioengine_fmodex.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra') 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; } -- cgit v1.2.3