Skip to content

Commit 70e5d6f

Browse files
committed
Bugfix: If spotify is not enabled, an Exception is thrown on its page
1 parent 73d4252 commit 70e5d6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ESDSoundboardApp/src/main/java/vv3ird/ESDSoundboardApp/ngui/pages/JSpotifySoundPage.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public JSpotifySoundPage() {
7070

7171
private void updateList() {
7272
pnContent.removeAll();
73-
List<Sound> sbs = AudioApp.getSpotifyPlaylistSounds(Type.AMBIENCE).stream()
74-
.filter(s -> filter.length() == 0 || s.getName().toLowerCase().contains(filter.toLowerCase())).collect(Collectors.toList());
73+
List<Sound> sbs = AudioApp.getSpotifyPlaylistSounds(Type.AMBIENCE);
7574
if(sbs == null)
7675
sbs = new LinkedList<>();
76+
sbs.stream().filter(s -> filter.length() == 0 || s.getName().toLowerCase().contains(filter.toLowerCase())).collect(Collectors.toList());
7777
List<JPanel> toAdd = new ArrayList<>(sbs.size());
7878
for (Sound sound : sbs) {
7979
JSoundPanel jsbp = new JSoundPanel(sound, ColorScheme.MAIN_BACKGROUND_COLOR);

0 commit comments

Comments
 (0)