Fixes issue when xml file is corrupt and no doc type is registered, the mvc controller factory throws an exception.

This commit is contained in:
Shannon Deminick
2012-10-04 21:06:32 +05:00
parent 8804d912f2
commit 261a6af60a

View File

@@ -2,6 +2,7 @@ using System;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.SessionState;
using Umbraco.Core;
namespace Umbraco.Web.Mvc
{
@@ -97,6 +98,10 @@ namespace Umbraco.Web.Mvc
public new Type GetControllerType(RequestContext requestContext, string controllerName)
{
if (controllerName.IsNullOrWhiteSpace())
{
return null;
}
return base.GetControllerType(requestContext, controllerName);
}
}