From 3fa630e7303c48ae1bb8c8c745fd9a05ca3dddf1 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Thu, 5 Jun 2014 03:01:55 +0700 Subject: [PATCH] Fixes #318, null types inadvertently returned from MvcSiteMapNodeAttributeDefinitionProvider.GetTypesFromAssembly() method. --- .../Reflection/MvcSiteMapNodeAttributeDefinitionProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Reflection/MvcSiteMapNodeAttributeDefinitionProvider.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Reflection/MvcSiteMapNodeAttributeDefinitionProvider.cs index cfbad7bf..120e11e7 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Reflection/MvcSiteMapNodeAttributeDefinitionProvider.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Reflection/MvcSiteMapNodeAttributeDefinitionProvider.cs @@ -34,7 +34,7 @@ protected virtual IEnumerable GetTypesFromAssembly(Assembly assembly) } catch (ReflectionTypeLoadException ex) { - return ex.Types; + return ex.Types.Where(t => t != null); } }