diff options
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 63ac7fb12..ec49a7d5d 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -925,14 +925,18 @@ impl_list_passwords (EphyPasswordManager *manager) #ifdef HAVE_GECKO_1_9 nsILoginInfo **logins = nsnull; - PRUint32 count,i; + PRUint32 count = 0,i; nsresult rv; nsCOMPtr<nsILoginManager> loginManager = do_GetService (NS_LOGINMANAGER_CONTRACTID); NS_ENSURE_TRUE (loginManager, NULL); - loginManager -> GetAllLogins(&count, &logins); + rv = loginManager -> GetAllLogins(&count, &logins); + if (NS_FAILED (rv)) + return NULL; + if (count <= 0 || !logins) + return NULL; for (i=0; i < count; i++) { nsString transfer; |