summaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/masterpassword.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libsylph/masterpassword.c b/libsylph/masterpassword.c
index 4cef644..d240a7a 100644
--- a/libsylph/masterpassword.c
+++ b/libsylph/masterpassword.c
@@ -140,15 +140,12 @@ gint check_master_password_interactively(guint max_attempts) {
140 140
141 guint cnt; 141 guint cnt;
142 142
143 if (max_attempts < 1) 143 g_return_val_if_fail(max_attempts > 0, 1);
144 return 1; 144 g_return_val_if_fail(prefs_common.master_password_hash != NULL, 1);
145
146 if (prefs_common.master_password_hash != NULL) {
147 return 1;
148 }
149 145
150 if (master_password != NULL) { 146 if (master_password != NULL) {
151 /* password already cached */ 147 /* password already cached */
148 debug_print("Master password already cached\n");
152 return check_password(master_password, 149 return check_password(master_password,
153 prefs_common.master_password_hash); 150 prefs_common.master_password_hash);
154 } 151 }