From 7d2cc4d4e2dc9864e08f2dd4a00bb08bfd7ac8b6 Mon Sep 17 00:00:00 2001 From: Andrei Date: Tue, 23 Oct 2018 19:13:47 +0300 Subject: [PATCH] https://github.com/xamarin/Xamarin.Forms/issues/4076 fix (#4161) --- Xamarin.Forms.Platform.MacOS/Renderers/EntryRenderer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.MacOS/Renderers/EntryRenderer.cs index e31477ef86f..72edb58c41c 100644 --- a/Xamarin.Forms.Platform.MacOS/Renderers/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.MacOS/Renderers/EntryRenderer.cs @@ -77,7 +77,7 @@ void HandleWindowDidResignKey(object sender, EventArgs args) void HandleWindowDidBecomeKey(object sender, EventArgs args) { - if (CurrentEditor == Window.FirstResponder) + if (Window != null && CurrentEditor == Window.FirstResponder) FocusChanged?.Invoke(this, new BoolEventArgs(true)); } }