neumatho / NostalgicPlayer

Music/module player written in C# that can play old modules from the Amiga and PC days. You can download modules from my home page.
https://nostalgicplayer.dk
MIT License
37 stars 4 forks source link

NostalgicPlayerConsole throws System.NullReferenceException #35

Closed mnerec closed 1 year ago

mnerec commented 1 year ago

In Polycode.NostalgicPlayer.PlayerLibrary.Mixer.MixerVisualize.QueueChannelChange() enabledChannels is dereferenced without checking for null.

Changing Enabled = i < enabledChannels.Length ? enabledChannels[i] : true to Enabled = (enabledChannels != null && i < enabledChannels.Length) ? enabledChannels[i] : true fixes the issue.

It might only be for some formats. Reproduced with PT and JamCracker mods.

neumatho commented 1 year ago

Thanks. Will look at it later today.

neumatho commented 1 year ago

Bug fixed.