Browse Source

Avoid NRE in DefaultMenuInteractionHandler.

The input can arrive after the interaction handler has already been detached.
pull/2926/head
Steven Kirk 7 years ago
parent
commit
13333cd820
  1. 2
      src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs

2
src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs

@ -377,7 +377,7 @@ namespace Avalonia.Controls.Platform
if (mouse?.Type == RawPointerEventType.NonClientLeftButtonDown)
{
Menu.Close();
Menu?.Close();
}
}

Loading…
Cancel
Save