Prevent crash

This commit is contained in:
M66B 2019-08-14 20:47:18 +02:00
parent 8a47247486
commit cdf95f7040
1 changed files with 2 additions and 5 deletions

View File

@ -274,11 +274,8 @@ public class FragmentIdentity extends FragmentBase {
@Override
public void afterTextChanged(Editable editable) {
String email = editable.toString();
if (email.contains("@"))
etDomain.setText(email.split("@")[1]);
else
etDomain.setText(null);
String[] email = editable.toString().split("@");
etDomain.setText(email.length < 2 ? null : email[1]);
}
});