From b42458be76891a08968f0c9fc516889a4e0dd24f Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Fri, 3 Apr 2020 23:19:42 +0200 Subject: [PATCH] Input manager subscription may be null. As we accept a null `InputManager` for unit testing. --- 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 bf811ad008..3715bc52a4 100644 --- a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs +++ b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs @@ -96,7 +96,7 @@ namespace Avalonia.Controls.Platform root.Deactivated -= WindowDeactivated; } - _inputManagerSubscription!.Dispose(); + _inputManagerSubscription?.Dispose(); Menu = null; _root = null;