From a4a162fc78258be26ed63f44c4a04b1928d536cc Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 28 Jan 2020 13:39:39 +0100 Subject: [PATCH] Fix NRE in DefaultMenuInteractionHandler. Fixes #3459 --- src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs index 97aeead608..813fbf60cb 100644 --- a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs +++ b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs @@ -218,7 +218,7 @@ namespace Avalonia.Controls.Platform e.Handled = true; } } - else if (item.Parent?.MoveSelection(direction.Value, true) == true) + else if (item?.Parent?.MoveSelection(direction.Value, true) == true) { // If the the parent is an IMenu which successfully moved its selection, // and the current menu is open then close the current menu and open the