music: check game state before applying sliders on startup

This accesses vars, which typically cannot be accessed when not logged in, or in early startup
This commit is contained in:
Adam
2021-09-11 00:02:19 -04:00
parent 9cadc62eba
commit 9cd1cbcea0

View File

@@ -186,7 +186,7 @@ public class MusicPlugin extends Plugin
channels = new Channel[]{musicChannel, effectChannel, areaChannel};
addMusicButtons();
if (musicConfig.granularSliders())
if (client.getGameState() == GameState.LOGGED_IN && musicConfig.granularSliders())
{
updateMusicOptions();
resetSettingsWindow();