Bug 673240 - Thunderbird crashes when opening IMAP Account mail with MoreFunctionsForAddressBook addon [@ morkTable::HasRow] | [[@ nsAddrDatabase::HasRowButDeletedForCharColumn] (Mac & linux). r=dbienvenu,a=Standard8
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 27 Jul 2011 14:15:48 +0900
changeset 8316 5e7da8cde985fea0fb905824a0656e530f9be810
parent 8315 43b778218bea3bf03a07066d204cae75bb461ce3
child 8317 5c29f890b7a7b2446983e69f353fd093f1166b97
push id84
push userbugzilla@standard8.plus.com
push dateTue, 16 Aug 2011 21:25:04 +0000
treeherdercomm-beta@6970c86be3cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbienvenu, Standard8
bugs673240
Bug 673240 - Thunderbird crashes when opening IMAP Account mail with MoreFunctionsForAddressBook addon [@ morkTable::HasRow] | [[@ nsAddrDatabase::HasRowButDeletedForCharColumn] (Mac & linux). r=dbienvenu,a=Standard8
mailnews/addrbook/src/nsAddrDatabase.cpp
--- a/mailnews/addrbook/src/nsAddrDatabase.cpp
+++ b/mailnews/addrbook/src/nsAddrDatabase.cpp
@@ -3282,17 +3282,17 @@ nsAddrDatabase::HasRowButDeletedForCharC
   nsresult rv;
 
   if (aIsCard)
   {
     rv = m_mdbStore->FindRow(m_mdbEnv, m_CardRowScopeToken,
       findColumn, &sourceYarn,  &outRowId, aFindRow);
 
     // no such card, so bail out early
-    if (NS_SUCCEEDED(rv) && !*aFindRow)
+    if (NS_FAILED(rv) || !*aFindRow)
       return PR_FALSE;
 
     // we might not have loaded the "delete cards" table yet
     // so do that (but don't create it, if we don't have one),
     // so we can see if the row is really a delete card.
     if (!m_mdbDeletedCardsTable)
       rv = InitDeletedCardsTable(PR_FALSE);