mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#18843: Fixing potential null reference exception
Work Item: 18843 --HG-- branch : 1.5.x
This commit is contained in:
@@ -43,6 +43,10 @@ namespace Orchard.Core.Navigation.Drivers {
|
|||||||
}
|
}
|
||||||
protected override DriverResult Display(MenuWidgetPart part, string displayType, dynamic shapeHelper) {
|
protected override DriverResult Display(MenuWidgetPart part, string displayType, dynamic shapeHelper) {
|
||||||
return ContentShape( "Parts_MenuWidget", () => {
|
return ContentShape( "Parts_MenuWidget", () => {
|
||||||
|
if(part.Menu == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
var menu = _menuService.GetMenu(part.Menu.Id);
|
var menu = _menuService.GetMenu(part.Menu.Id);
|
||||||
|
|
||||||
if(menu == null) {
|
if(menu == null) {
|
||||||
|
Reference in New Issue
Block a user