diff options
-rw-r--r-- | indra/llaudio/llaudioengine_fmodstudio.cpp | 7 |
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; } |