From 85ad8ae67beca4959532e8644c614fa3a912e559 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 24 Jul 2014 14:47:40 +0000 Subject: [PATCH] * fix NPE --- source/net/filebot/format/MediaBindingBean.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index ac6a9b56..84f95666 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -555,9 +555,9 @@ public class MediaBindingBean { if (metaInfo == null) { try { if (infoObject instanceof Episode) - metaInfo = WebServices.TheTVDB.getSeriesInfoByName(getEpisode().getSeriesName(), getEpisode().getLanguage()); + metaInfo = WebServices.TheTVDB.getSeriesInfoByName(getEpisode().getSeriesName(), getEpisode().getLanguage() == null ? Locale.ENGLISH : getEpisode().getLanguage()); if (infoObject instanceof Movie) - metaInfo = WebServices.TheMovieDB.getMovieInfo(getMovie(), getMovie().getLanguage(), true); + metaInfo = WebServices.TheMovieDB.getMovieInfo(getMovie(), getMovie().getLanguage() == null ? Locale.ENGLISH : getMovie().getLanguage(), true); } catch (Exception e) { throw new RuntimeException("Failed to retrieve metadata: " + infoObject, e); }