mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 08:34:30 +00:00
fix(addressbook): Fix NSException on address book where uppercaseString is called on data
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
{
|
||||
if (!card)
|
||||
{
|
||||
if ([[content uppercaseString] hasPrefix: @"BEGIN:VCARD"])
|
||||
if ([[[self contentAsString] uppercaseString] hasPrefix: @"BEGIN:VCARD"])
|
||||
card = [NGVCard parseSingleFromSource: content];
|
||||
else
|
||||
card = [NGVCard cardWithUid: [self nameInContainer]];
|
||||
|
||||
@@ -97,8 +97,10 @@
|
||||
int intValue;
|
||||
|
||||
data = [objectRecord objectForKey: @"c_content"];
|
||||
if (data)
|
||||
if (data && [data isKindOfClass: [NSString class]])
|
||||
ASSIGN (content, data);
|
||||
else
|
||||
ASSIGN (content, [NSString stringWithUTF8String:[data bytes]]);
|
||||
data = [objectRecord objectForKey: @"c_version"];
|
||||
if (data)
|
||||
version = [data unsignedIntValue];
|
||||
|
||||
Reference in New Issue
Block a user