From 41cae8d3c5a5b7b2b8e605c137033e613838071b Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sun, 22 Jul 2018 17:59:13 +0300 Subject: [PATCH] Added null check to Sound.StreamVolume --- Barotrauma/BarotraumaClient/Source/Sounds/Sound.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaClient/Source/Sounds/Sound.cs b/Barotrauma/BarotraumaClient/Source/Sounds/Sound.cs index db4563b2e..e9bfdcfb8 100644 --- a/Barotrauma/BarotraumaClient/Source/Sounds/Sound.cs +++ b/Barotrauma/BarotraumaClient/Source/Sounds/Sound.cs @@ -246,7 +246,7 @@ namespace Barotrauma public static void StreamVolume(float volume = 1.0f) { - if (SoundManager.Disabled) return; + if (SoundManager.Disabled || stream == null) return; stream.Volume = volume; }