Fix broken removeGenre to avoid possible null-pointer

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda 2025-12-08 00:33:23 -03:00
parent bcd03fc7ce
commit 09d20efba6
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ public class Album {
}
public void removeGenre(Genre genre) {
if (genre != null) {
return;
}
albumGenres.removeIf(ag ->
ag.getGenre() != null &&
ag.getGenre().getId() != null &&