summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-19 15:47:49 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-19 15:47:49 +0200
commitf5ec281b1b578dfee17353ecf6d469a29de86d25 (patch)
tree9d744641d57ae22b374b540ec2104f902491286b /indra
parent62be7c38965deb79cbd984cfd4546be040f9c465 (diff)
SL-11445 Fix crash caused by wind cleanup
Diffstat (limited to 'indra')
-rw-r--r--indra/llaudio/llaudioengine_fmodstudio.cpp7
1 files changed, 6 insertions, 1 deletions
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