Skip to content

Commit

Permalink
Merge pull request #2649 from cwensley/curtis/mac-fix-nre-with-text-i…
Browse files Browse the repository at this point in the history
…nput

Mac: Fix NRE when handling TextInput
  • Loading branch information
cwensley committed Apr 29, 2024
2 parents 376489d + 3aeb6a4 commit 32486aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Eto.Mac/Forms/MacViewTextInput.cs
Expand Up @@ -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;
}
Expand Down

0 comments on commit 32486aa

Please sign in to comment.