Browse Source

Fix NRE in DefaultMenuInteractionHandler.

Fixes #3459
pull/3480/head
Steven Kirk 7 years ago
parent
commit
a4a162fc78
  1. 2
      src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs

2
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

Loading…
Cancel
Save