mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Protect menu item comparer from null route values
Prevents a null ysod in rare cases --HG-- branch : dev
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user