From 64629128ff00c97d86312957e7aba64d959cac4b Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 3 Oct 2018 11:54:47 +0100 Subject: [PATCH] fixes a NRE in menu interaction handler --- 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 a44495b90c..6b03e67897 100644 --- a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs +++ b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs @@ -331,7 +331,7 @@ namespace Avalonia.Controls.Platform { var item = GetMenuItem(e.Source as IControl); - if (e.MouseButton == MouseButton.Left && item.HasSubMenu == false) + if (e.MouseButton == MouseButton.Left && item?.HasSubMenu == false) { Click(item); e.Handled = true;