From df79418064c898eaad4878abdd5143c0f2082ab4 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 23 Apr 2016 00:05:50 +0800 Subject: [PATCH] Fix NPE --- source/net/filebot/web/Artwork.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/net/filebot/web/Artwork.java b/source/net/filebot/web/Artwork.java index 202265cf..1c77923f 100644 --- a/source/net/filebot/web/Artwork.java +++ b/source/net/filebot/web/Artwork.java @@ -54,6 +54,10 @@ public class Artwork implements Serializable { } public boolean matches(Object... tags) { + if (tags == null || tags.length == 0) { + return true; + } + return stream(tags).filter(Objects::nonNull).map(Object::toString).allMatch(tag -> { return stream(this.tags).anyMatch(tag::equalsIgnoreCase) || tag.equalsIgnoreCase(language); });