Adds null checks to the ContentTreeController too

This commit is contained in:
Shannon
2017-03-23 12:53:48 +11:00
parent 31d8f49d3b
commit d37106576d
2 changed files with 6 additions and 2 deletions

View File

@@ -207,7 +207,11 @@ namespace Umbraco.Web.Trees
return false;
}
IContent content = Services.ContentService.GetById(entity.Id);
var content = Services.ContentService.GetById(entity.Id);
if (content == null)
{
return false;
}
return Security.CurrentUser.HasPathAccess(content);
}