Fix NPE when there is no type

This commit is contained in:
Stephen Paul Weber 2022-03-09 22:23:57 -05:00
parent d0c1d9d72c
commit a607f2f20a
No known key found for this signature in database
GPG Key ID: D11C2911CE519CDE
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ public class EnterJidDialog extends DialogFragment implements OnBackendConnected
final String type = gatewayListAdapter.getSelectedType();
// Resolve based on local settings before submission
if (type.equals("pstn") || type.equals("sms")) {
if (type != null && (type.equals("pstn") || type.equals("sms"))) {
try {
binding.jid.setText(PhoneNumberUtilWrapper.normalize(getActivity(), binding.jid.getText().toString()));
} catch (NumberParseException | NullPointerException e) { }