From f5ec281b1b578dfee17353ecf6d469a29de86d25 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 19 Mar 2020 15:47:49 +0200 Subject: SL-11445 Fix crash caused by wind cleanup --- indra/llaudio/llaudioengine_fmodstudio.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/llaudio/llaudioengine_fmodstudio.cpp b/indra/llaudio/llaudioengine_fmodstudio.cpp index 1dd9b830a6..15bf8926c1 100644 --- a/indra/llaudio/llaudioengine_fmodstudio.cpp +++ b/indra/llaudio/llaudioengine_fmodstudio.cpp @@ -55,7 +55,7 @@ LLAudioEngine_FMODSTUDIO::LLAudioEngine_FMODSTUDIO(bool enable_profiler) mWindDSP = NULL; mSystem = NULL; mEnableProfiler = enable_profiler; - mWindDSPDesc = new FMOD_DSP_DESCRIPTION(); + mWindDSPDesc = NULL; } @@ -286,6 +286,11 @@ bool LLAudioEngine_FMODSTUDIO::initWind() { mNextWindUpdate = 0.0; + if (!mWindDSPDesc) + { + mWindDSPDesc = new FMOD_DSP_DESCRIPTION(); + } + if (!mWindDSP) { memset(mWindDSPDesc, 0, sizeof(*mWindDSPDesc)); //Set everything to zero -- cgit v1.2.3