X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-tny-account-store.c;h=e6dd55cddd220f72653e89f273ac181352fea40e;hp=46516acc1be21e9eab9b3b68a8810d54bf9c77d6;hb=fca5bcd84a37ec28a0f92092e5377f68e2d432b3;hpb=046b63bfa19696e4cba6ddca8f9e463a7e23115c diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 46516ac..e6dd55c 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -391,6 +391,8 @@ get_password (TnyAccount *account, const gchar * prompt_not_used, gboolean *canc if (cancel) *cancel = FALSE; + g_return_val_if_fail (account, NULL); + const gchar *key; const TnyAccountStore *account_store; ModestTnyAccountStore *self; @@ -410,7 +412,8 @@ get_password (TnyAccount *account, const gchar * prompt_not_used, gboolean *canc /* is it in the hash? if it's already there, it must be wrong... */ pwd_ptr = (gpointer)&pwd; /* pwd_ptr so the compiler does not complained about * type-punned ptrs...*/ - already_asked = g_hash_table_lookup_extended (priv->password_hash, + already_asked = priv->password_hash && + g_hash_table_lookup_extended (priv->password_hash, key, NULL, (gpointer*)&pwd_ptr);