Add null checks to EnsureDates

This commit is contained in:
Luke Pulverenti 2013-12-20 15:17:54 -05:00
parent 594ed864c6
commit cb6350728d

View file

@ -133,6 +133,19 @@ namespace MediaBrowser.Controller.Resolvers
/// <param name="includeCreationTime">if set to <c>true</c> [include creation time].</param>
public static void EnsureDates(IFileSystem fileSystem, BaseItem item, ItemResolveArgs args, bool includeCreationTime)
{
if (fileSystem == null)
{
throw new ArgumentNullException("fileSystem");
}
if (item == null)
{
throw new ArgumentNullException("item");
}
if (args == null)
{
throw new ArgumentNullException("args");
}
// See if a different path came out of the resolver than what went in
if (!string.Equals(args.Path, item.Path, StringComparison.OrdinalIgnoreCase))
{