From 7d7fe6491d88ce94773a8eef48973af887f5df67 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Thu, 9 Feb 2017 15:19:13 +0100 Subject: [PATCH] little fix --- Classes/Contact.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/Contact.m b/Classes/Contact.m index 2558ccb9a..d2b552b87 100644 --- a/Classes/Contact.m +++ b/Classes/Contact.m @@ -187,8 +187,9 @@ - (BOOL)setSipAddress:(NSString *)sip atIndex:(NSInteger)index { BOOL ret = FALSE; + NSString *normSip = NULL; if (_person) { - NSString *normSip = [self setOrCreateSipContactEntry:index withValue:sip]; + normSip = [self setOrCreateSipContactEntry:index withValue:sip]; NSDictionary *lDict = @{ (NSString *)kABPersonInstantMessageUsernameKey : normSip ? normSip : sip, (NSString *)kABPersonInstantMessageServiceKey : LinphoneManager.instance.contactSipField @@ -200,7 +201,7 @@ } if (ret) { - _sipAddresses[index] = normSip ? normSip : normSip ? normSip : sip; + _sipAddresses[index] = normSip ? normSip : sip; } return ret; }