Added null check to Sound.StreamVolume

This commit is contained in:
Joonas Rikkonen
2018-07-22 17:59:13 +03:00
parent 78a5dcbfe9
commit 41cae8d3c5

View File

@@ -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;
}