Return -1 if an episode is null.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Sep 2013 09:53:33 +0000 (11:53 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Sep 2013 09:53:33 +0000 (11:53 +0200)
src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java

index 5d494e5..a0c2bf4 100644 (file)
@@ -106,7 +106,7 @@ public class EpisodeState extends AbstractState implements Iterable<Episode> {
 
                        @Override
                        public Integer apply(Episode episode) {
-                               return episode.season();
+                               return (episode != null ) ? episode.season() : -1;
                        }
                };