Quick Fix for Limbo Music Crash
The following small change deals with a strange background-music-related crash. Wasn't this issue fixed for Jaitsu and Aether II? I'm not sure what's the cause but I've added a check to prevent the NPE. Please deal with this most robustly in the future.
This commit is contained in:
@@ -222,6 +222,10 @@ public class EventHookContainer
|
||||
{
|
||||
SoundManager sndManager = FMLClientHandler.instance().getClient().sndManager;
|
||||
|
||||
// SenseiKiwi: I've added the following check as a quick fix for a reported crash.
|
||||
// This needs to work without a hitch or we have to stop trying to replace the background music...
|
||||
if (sndManager != null && sndManager.sndSystem != null)
|
||||
{
|
||||
if (world.provider instanceof LimboProvider)
|
||||
{
|
||||
sndManager.sndSystem.stop("BgMusic");
|
||||
@@ -239,3 +243,4 @@ public class EventHookContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user