Fix NPE in TraxManager.fromItemId

This commit is contained in:
Alejandro 2020-02-27 22:55:09 +02:00
parent 09114ba977
commit 8c9faa56e6

View File

@ -261,7 +261,7 @@ public class TraxManager implements Disposable {
public InteractionMusicDisc fromItemId(int itemId) {
for (InteractionMusicDisc musicDisc : this.songs) {
if (musicDisc.getId() == itemId) {
if (musicDisc != null && musicDisc.getId() == itemId) {
return musicDisc;
}
}