diff --git a/src/Orchard/UI/Navigation/MenuItemComparer.cs b/src/Orchard/UI/Navigation/MenuItemComparer.cs index 256596f1e..2b4ee728b 100644 --- a/src/Orchard/UI/Navigation/MenuItemComparer.cs +++ b/src/Orchard/UI/Navigation/MenuItemComparer.cs @@ -40,7 +40,12 @@ namespace Orchard.UI.Navigation { } if (obj.RouteValues != null) { foreach (var item in obj.RouteValues) { - hash ^= item.Key.GetHashCode() ^ item.Value.GetHashCode(); + if (item.Key != null) { + hash ^= item.Key.GetHashCode(); + } + if (item.Value != null) { + hash ^= item.Value.GetHashCode(); + } } } return hash;