From 5d9a5ecf13a24466af8c382ddf9633bad327149e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 27 Jan 2021 05:16:41 +0100 Subject: [PATCH] ensure the sound effect instance emitter is nonnull --- MLEM/Misc/SoundEffectInstanceHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLEM/Misc/SoundEffectInstanceHandler.cs b/MLEM/Misc/SoundEffectInstanceHandler.cs index 21ec057..e931955 100644 --- a/MLEM/Misc/SoundEffectInstanceHandler.cs +++ b/MLEM/Misc/SoundEffectInstanceHandler.cs @@ -132,7 +132,7 @@ namespace MLEM.Misc { } public void TryApply3D(AudioListener[] listeners) { - if (listeners != null && listeners.Length > 0) + if (listeners != null && listeners.Length > 0 && this.Emitter != null) this.Instance.Apply3D(listeners, this.Emitter); }