Cannot get property 'imdbId' on null object

This commit is contained in:
Reinhard Pointner 2017-03-21 17:46:37 +08:00
parent 38ef460f1b
commit 0a9b139256
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ def updateMovieIndex = { m ->
if (!recentMoviesIndex.containsKey(m.tmdbId)) { if (!recentMoviesIndex.containsKey(m.tmdbId)) {
def i = TheMovieDB.getMovieInfo(m, Locale.ENGLISH, false) def i = TheMovieDB.getMovieInfo(m, Locale.ENGLISH, false)
if (i.imdbId == null) if (i == null || i.imdbId == null)
return return
def row = [i.id.pad(6), i.imdbId.pad(7), i.released.year as String, i.name] def row = [i.id.pad(6), i.imdbId.pad(7), i.released.year as String, i.name]