prevent NPE in equals check
@@ -64,12 +64,15 @@ public class CurrentlyPlayingTrack {
return false;
CurrentlyPlayingTrack other = (CurrentlyPlayingTrack) obj;
- if (this.getItem() == null) {
- if (other.getItem() != null)
+
+ if (this.getItem() == null || other.getItem() == null) {
return false;
- } else if (!this.getItem().getUri().equals(other.getItem().getUri()))
+ }
+ if (this.getItem().getUri() == null || other.getItem().getUri() == null) {
return false;
- return true;
+ }
+
+ return this.getItem().getUri().equals(other.getItem().getUri());
}
