fix for crasher bug #117478. I goofed when converting from strcmp to Equals().

this code is there to handle the migration case where our "old" sortedColumn is no
longer a valid column.  r/sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2002-01-03 21:24:06 +00:00
Родитель a0db6b0fc0
Коммит 18ce084e8c
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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