don't call replace() on null formattedNumber

Fixes #1397
// FREEBIE
This commit is contained in:
Jake McGinty 2014-05-08 15:18:35 -07:00 committed by Moxie Marlinspike
parent 5bfe64752e
commit dff6997a65

View File

@ -245,7 +245,7 @@ public class RegistrationActivity extends SherlockActivity {
formattedNumber = countryFormatter.inputDigit(number.charAt(i));
}
if (!s.toString().equals(formattedNumber)) {
if (formattedNumber != null && !s.toString().equals(formattedNumber)) {
s.replace(0, s.length(), formattedNumber);
}
}