From 7159c16e06d658494a83e90f4e985dc2469208ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 19 Sep 2013 11:53:33 +0200 Subject: [PATCH] Return -1 if an episode is null. --- src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }; -- 2.7.4