Permalink
Browse files

Fix bug where empty string would be returned instead of expected nil

  • Loading branch information...
1 parent 26bc5d7 commit a9f587e3138d4a86ee92c4e51cda357cf9fd336e @danielctull committed Sep 6, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 DCTAuth/DCTAuthAccount.m
View
@@ -139,6 +139,7 @@ - (NSString *)_secureValueForKey:(NSString *)key {
[query setObject:(__bridge id)kSecMatchLimitOne forKey:(__bridge id)kSecMatchLimit];
CFTypeRef result = NULL;
SecItemCopyMatching((__bridge CFDictionaryRef)query, &result);
+ if (!result) return nil;
return [[NSString alloc] initWithData:(__bridge_transfer NSData *)result encoding:NSUTF8StringEncoding];
}

0 comments on commit a9f587e

Please sign in to comment.