Fixed null exception

This commit is contained in:
luisc committed 2024-05-14 17:59:25 -05:00
1 parent 3220931e62
commit a3e74f2ea5
1 file changed
+4 -2
@@ -17,8 +17,10 @@ public class MusicController {
public void stopMusic(){
SoundHandler soundHandler = Minecraft.getMinecraft().getSoundHandler();
soundHandler.stopSounds();
this.sound.stopSound();
this.sound = null;
if (this.isPlaying()) {
this.sound.stopSound();
this.sound = null;
}
}
public void playStreaming(String music, Entity entity){