Fix broken removeGenre to avoid possible null-pointer
This commit is contained in:
parent
bcd03fc7ce
commit
09d20efba6
|
|
@ -98,6 +98,9 @@ public class Album {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeGenre(Genre genre) {
|
public void removeGenre(Genre genre) {
|
||||||
|
if (genre != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
albumGenres.removeIf(ag ->
|
albumGenres.removeIf(ag ->
|
||||||
ag.getGenre() != null &&
|
ag.getGenre() != null &&
|
||||||
ag.getGenre().getId() != null &&
|
ag.getGenre().getId() != null &&
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue