From bd0ec5dfceef0d1dd20fa517cd4da83b2df8fd8a Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Sat, 14 Jan 2017 10:13:31 +0100 Subject: [PATCH] Fix epic fail on migration 117 --- .../Datastore/Migration/117_update_movie_file.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/117_update_movie_file.cs b/src/NzbDrone.Core/Datastore/Migration/117_update_movie_file.cs index 8e45441c1..903053418 100644 --- a/src/NzbDrone.Core/Datastore/Migration/117_update_movie_file.cs +++ b/src/NzbDrone.Core/Datastore/Migration/117_update_movie_file.cs @@ -25,8 +25,15 @@ namespace NzbDrone.Core.Datastore.Migration { var id = seriesReader.GetInt32(0); var relativePath = seriesReader.GetString(1); - - var edition = Parser.Parser.ParseMovieTitle(relativePath).Edition; + + var result = Parser.Parser.ParseMovieTitle(relativePath); + + var edition = ""; + + if (result != null) + { + edition = Parser.Parser.ParseMovieTitle(relativePath).Edition; + } using (IDbCommand updateCmd = conn.CreateCommand()) {