diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index fdbdc782a..51cb4a8ff 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -57,7 +57,7 @@ NSMutableDictionary *defaultsToRegister = [[NSMutableDictionary alloc] initWithCapacity:[preferences count]]; for(NSDictionary *prefSpecification in preferences) { NSString *key = [prefSpecification objectForKey:@"Key"]; - if(key) { + if(key && [prefSpecification objectForKey:@"DefaultValue"]) { [defaultsToRegister setObject:[prefSpecification objectForKey:@"DefaultValue"] forKey:key]; } } diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index f97158161..b87078e3c 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -242,7 +242,7 @@ static LinphoneCoreVTable linphonec_vtable = { -(void) configurePayloadType:(const char*) type fromPrefKey: (NSString*)key withRate:(int)rate { if ([[NSUserDefaults standardUserDefaults] boolForKey:key]) { PayloadType* pt; - if(pt = linphone_core_find_payload_type(theLinphoneCore,type,rate)) { + if((pt = linphone_core_find_payload_type(theLinphoneCore,type,rate))) { linphone_core_enable_payload_type(theLinphoneCore,pt, TRUE); } }