Skip to content

Commit 92957eb

Browse files
authored
Merge pull request #12415 from 3dfxuser/fix
Add null check for TextInputMethodClient in OnSelectionChanged() method
2 parents d0b1389 + ec21caf commit 92957eb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Android/Avalonia.Android/AndroidInputMethod.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ private void _client_SelectionChanged(object sender, EventArgs e)
113113

114114
private void OnSelectionChanged()
115115
{
116+
if (Client is null)
117+
{
118+
return;
119+
}
120+
116121
var selection = Client.Selection;
117122

118123
_imm.UpdateSelection(_host, selection.Start, selection.End, selection.Start, selection.End);

0 commit comments

Comments
 (0)