Skip to content

Commit

Permalink
try to fix NRE #834
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSparkles committed Nov 17, 2021
1 parent 307455a commit fea75e5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions TVRename/Sources/TMDB/LocalCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,17 @@ internal CachedMovieInfo DownloadMovieNow([NotNull] ISeriesSpecifier id, bool sh
}
foreach (Cast? s in downloadedMovie.Credits.Cast)
{
m.AddActor(new Actor(s.Id, OriginalImageUrl(s.ProfilePath), s.Name, s.Character, s.CastId, s.Order));
if (s is not null)
{
m.AddActor(new Actor(s.Id, OriginalImageUrl(s.ProfilePath), s.Name, s.Character, s.CastId, s.Order));
}
}
foreach (TMDbLib.Objects.General.Crew? s in downloadedMovie.Credits.Crew)
{
m.AddCrew(new Crew(s.Id, OriginalImageUrl(s.ProfilePath), s.Name, s.Job, s.Department, s.CreditId));
if (s is not null)
{
m.AddCrew(new Crew(s.Id, OriginalImageUrl(s.ProfilePath), s.Name, s.Job, s.Department, s.CreditId));
}
}
AddMovieImages(downloadedMovie,m);

Expand Down

0 comments on commit fea75e5

Please sign in to comment.