From: David ‘Bombe’ Roden Date: Thu, 19 Sep 2013 09:53:33 +0000 (+0200) Subject: Return -1 if an episode is null. X-Git-Tag: v2~273 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7159c16e06d658494a83e90f4e985dc2469208ae;p=rhynodge.git Return -1 if an episode is null. --- diff --git a/src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java b/src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java index 5d494e5..a0c2bf4 100644 --- a/src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java +++ b/src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java @@ -106,7 +106,7 @@ public class EpisodeState extends AbstractState implements Iterable { @Override public Integer apply(Episode episode) { - return episode.season(); + return (episode != null ) ? episode.season() : -1; } };