aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPKeychain.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/SPKeychain.m b/Source/SPKeychain.m
index 9d9c89a5..03ba464f 100644
--- a/Source/SPKeychain.m
+++ b/Source/SPKeychain.m
@@ -58,6 +58,11 @@
SecKeychainAttribute attributes[4];
SecKeychainAttributeList attList;
+ // If a nil password was supplied, do nothing.
+ if (!password) {
+ return;
+ }
+
// Check supplied variables and replaces nils with empty strings
if (!name) name = @"";
if (!account) account = @"";