Update VcardParser.java

Check if telephone uri is null and return if it is.
This commit is contained in:
Mark McKinnon 2021-05-24 14:24:18 -04:00
parent 775e28a99f
commit 0fea6d4525

View File

@ -388,6 +388,9 @@ final class VcardParser {
String telephoneText = telephone.getText();
if (telephoneText == null || telephoneText.isEmpty()) {
if (telephone.getUri() == null) {
return;
}
telephoneText = telephone.getUri().getNumber();
if (telephoneText == null || telephoneText.isEmpty()) {
return;
@ -502,6 +505,9 @@ final class VcardParser {
private void addPhoneAccountInstances(Telephone telephone, AbstractFile abstractFile, Collection<AccountFileInstance> accountInstances) {
String telephoneText = telephone.getText();
if (telephoneText == null || telephoneText.isEmpty()) {
if (telephone.getUri() == null) {
return;
}
telephoneText = telephone.getUri().getNumber();
if (telephoneText == null || telephoneText.isEmpty()) {
return;