Skip to content

Commit 54a1679

Browse files
authored
Add null-check (xamarin#12089)
fixes xamarin#11965
1 parent 6006b0d commit 54a1679

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ void UpdateMaxLength()
390390

391391
bool ShouldChangeCharacters(UITextField textField, NSRange range, string replacementString)
392392
{
393-
var newLength = textField?.Text?.Length + replacementString.Length - range.Length;
393+
var newLength = textField?.Text?.Length + replacementString?.Length - range.Length;
394394
return newLength <= Element?.MaxLength;
395395
}
396396

0 commit comments

Comments
 (0)