epiphany r8375 - branches/gnome-2-24/embed/mozilla
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r8375 - branches/gnome-2-24/embed/mozilla
- Date: Mon, 4 Aug 2008 12:48:42 +0000 (UTC)
Author: chpe
Date: Mon Aug 4 12:48:42 2008
New Revision: 8375
URL: http://svn.gnome.org/viewvc/epiphany?rev=8375&view=rev
Log:
Bail out if listing the passwords fails or there are no results. Possibly fixes bug #542383.
Modified:
branches/gnome-2-24/embed/mozilla/mozilla-embed-single.cpp
Modified: branches/gnome-2-24/embed/mozilla/mozilla-embed-single.cpp
==============================================================================
--- branches/gnome-2-24/embed/mozilla/mozilla-embed-single.cpp (original)
+++ branches/gnome-2-24/embed/mozilla/mozilla-embed-single.cpp Mon Aug 4 12:48:42 2008
@@ -925,14 +925,18 @@
#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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]