diff --git a/mailnews/addrbook/src/nsAbCardProperty.cpp b/mailnews/addrbook/src/nsAbCardProperty.cpp index 4ca3d1bb876..a1211db8b9e 100644 --- a/mailnews/addrbook/src/nsAbCardProperty.cpp +++ b/mailnews/addrbook/src/nsAbCardProperty.cpp @@ -347,7 +347,9 @@ NS_IMETHODIMP nsAbCardProperty::GetCardValue(const char *attrname, PRUnichar **v break; } - NS_ENSURE_SUCCESS(rv,rv); + // don't assert here, as failure is expected in certain cases + // we call GetCardValue() from nsAbView::Init() to determine if the + // saved sortColumn is valid or not. return rv; } diff --git a/mailnews/addrbook/src/nsAbView.cpp b/mailnews/addrbook/src/nsAbView.cpp index e2737a36b4e..8d28555d2ce 100644 --- a/mailnews/addrbook/src/nsAbView.cpp +++ b/mailnews/addrbook/src/nsAbView.cpp @@ -227,7 +227,7 @@ NS_IMETHODIMP nsAbView::Init(const char *aURI, nsIAbViewListener *abViewListener // it may not be, if you migrated from older versions, or switched between // a mozilla build and a commercial build, which have different columns. nsAutoString actualSortColumn; - if (generatedNameColumnId.Equals(colID) && mCards.Count()) { + if (!generatedNameColumnId.Equals(colID) && mCards.Count()) { nsIAbCard *card = ((AbCard *)(mCards.ElementAt(0)))->card; nsXPIDLString value; // XXX todo