Additional null check in Wire Update, stopping paused sounds before deleting them (prevents an OpenAL error when switching to sub editor when the mainmenu drone sound is playing)
This commit is contained in:
@@ -47,14 +47,15 @@ namespace Barotrauma.Sounds
|
||||
|
||||
public static void Check()
|
||||
{
|
||||
#if !DEBUG
|
||||
return;
|
||||
#endif
|
||||
|
||||
ALError error;
|
||||
if ((error = AL.GetError()) != ALError.NoError)
|
||||
{
|
||||
DebugConsole.ThrowError("OpenAL error: "+AL.GetErrorString(error));
|
||||
#if DEBUG
|
||||
DebugConsole.ThrowError("OpenAL error: " + AL.GetErrorString(error));
|
||||
#else
|
||||
|
||||
DebugConsole.NewMessage("OpenAL error: "+AL.GetErrorString(error), Microsoft.Xna.Framework.Color.Red);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user