mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
bulletproof fix for 218414 crash opening imap folder, r/sr=mscott
This commit is contained in:
parent
fb4cd3d291
commit
cc2ca9bc0f
@ -3054,7 +3054,11 @@ FnSortIdKeyPtr(const void *pItem1, const void *pItem2, void *privateData)
|
||||
|
||||
nsIMsgDatabase *db = (nsIMsgDatabase *)privateData;
|
||||
|
||||
rv = db->CompareCollationKeys((*p1)->key,(*p1)->info.len,(*p2)->key,(*p2)->info.len,&retVal);
|
||||
// if either collation key is null, make empty key < non-empty key.
|
||||
if (! (*p1)->key || ! (*p2)->key)
|
||||
retVal = (*p1)->key ? 1 : ((*p2)->key ? -1 : 0);
|
||||
else
|
||||
rv = db->CompareCollationKeys((*p1)->key,(*p1)->info.len,(*p2)->key,(*p2)->info.len,&retVal);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"compare failed");
|
||||
|
||||
if (retVal != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user