From b6ff31755180f4f6800d0e25cf72e1eea350b44b Mon Sep 17 00:00:00 2001 From: QuentinArguillere Date: Tue, 22 Nov 2022 17:25:23 +0100 Subject: [PATCH] Check that contact address has a valid username when trying to match phone numbers --- Classes/Contact.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Contact.m b/Classes/Contact.m index 2e66a797f..149503318 100644 --- a/Classes/Contact.m +++ b/Classes/Contact.m @@ -494,7 +494,7 @@ for (NSString *address in _sipAddresses) { LinphoneAddress *addr = linphone_core_interpret_url_2(LC, [address UTF8String], YES); bool isFoundInPhones = false; - if (addr) { + if (addr && linphone_address_get_username(addr)) { for (NSString *phoneNb in _phones) { if ([phoneNb isEqualToString:[NSString stringWithUTF8String:linphone_address_get_username(addr)]]) { isFoundInPhones = true;