diff --git a/src/Eto.Mac/Forms/MacViewTextInput.cs b/src/Eto.Mac/Forms/MacViewTextInput.cs index 16f3cd23d..d2b24b667 100644 --- a/src/Eto.Mac/Forms/MacViewTextInput.cs +++ b/src/Eto.Mac/Forms/MacViewTextInput.cs @@ -48,7 +48,7 @@ static CGRect FirstRectForCharacterRange(IntPtr sender, IntPtr sel, NSRange rang if (obj is NSView ctl && MacBase.GetHandler(obj) is IMacViewHandler handler) { var rect = ctl.ConvertRectToView(ctl.Bounds, null); - return ctl.Window.ConvertRectToScreen(rect); + return ctl.Window?.ConvertRectToScreen(rect) ?? CGRect.Empty; } return CGRect.Empty; }