1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 20:58:34 +01:00

ensure the sound effect instance emitter is nonnull

This commit is contained in:
Ell 2021-01-27 05:16:41 +01:00
parent 182f8eff7a
commit 5d9a5ecf13

View file

@ -132,7 +132,7 @@ namespace MLEM.Misc {
} }
public void TryApply3D(AudioListener[] listeners) { 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); this.Instance.Apply3D(listeners, this.Emitter);
} }