From 80936671c4131378f78fa99a0477dcec74850536 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 10 Oct 2014 14:44:02 +0200 Subject: [PATCH] Prevent carsh if there is no default proxy config --- Classes/Utils/FastAddressBook.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Utils/FastAddressBook.m b/Classes/Utils/FastAddressBook.m index 0bc2b9a78..15e7770b9 100644 --- a/Classes/Utils/FastAddressBook.m +++ b/Classes/Utils/FastAddressBook.m @@ -164,12 +164,12 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf CFStringRef lLabel = ABMultiValueCopyLabelAtIndex(lMap, i); CFStringRef lLocalizedLabel = ABAddressBookCopyLocalizedLabel(lLabel); NSString* lNormalizedKey = [FastAddressBook normalizePhoneNumber:(NSString*)lValue]; - lNormalizedKey = [FastAddressBook normalizeSipURI:lNormalizedKey]; + NSString* lNormalizedSipKey = [FastAddressBook normalizeSipURI:lNormalizedKey]; + if (lNormalizedSipKey != NULL) lNormalizedKey = lNormalizedSipKey; [addressBookMap setObject:lPerson forKey:lNormalizedKey]; CFRelease(lValue); if (lLabel) CFRelease(lLabel); - if (lLocalizedLabel) CFRelease(lLocalizedLabel); - } + if (lLocalizedLabel) CFRelease(lLocalizedLabel); } CFRelease(lMap); } }