fix(addressbook(core)): safety check from broken URLs

pull/265/head
Ludovic Marcotte 2019-12-13 13:54:34 -05:00
parent 86643b4339
commit 0ceccdd612
1 changed files with 2 additions and 1 deletions

View File

@ -156,7 +156,8 @@
url = [NSURL URLWithString: value];
if (![url scheme] && [value length] > 0)
url = [NSURL URLWithString: [NSString stringWithFormat: @"http://%@", value]];
[attrs setObject: [url absoluteString] forKey: @"value"];
if (url)
[attrs setObject: [url absoluteString] forKey: @"value"];
[urls addObject: attrs];
}