fix crash importing outlook folders, r=standard8, fix in patch for bug 681647, fixes bug 698987
authorDavid Bienvenu <bienvenu@nventure.com>
Mon, 07 Nov 2011 16:01:38 -0800
changeset 9650 e5917383a6ae7c666ac9b1031554a1a76ba0de39
parent 9649 23f39809c091e8791d7796bae3b9fba3f0d9f3d2
child 9651 66e4aa9e3f45298c0e8e086a34eb1c89a8e7e477
push id281
push userbugzilla@standard8.plus.com
push dateWed, 21 Dec 2011 12:08:36 +0000
treeherdercomm-beta@6d973fa5c2e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstandard8, fix
bugs681647, 698987
fix crash importing outlook folders, r=standard8, fix in patch for bug 681647, fixes bug 698987
mailnews/import/src/nsImportMail.cpp
--- a/mailnews/import/src/nsImportMail.cpp
+++ b/mailnews/import/src/nsImportMail.cpp
@@ -798,19 +798,19 @@ ImportMailThread( void *stuff)
         if (NS_FAILED( rv)) {
           IMPORT_LOG1("*** ImportMailThread: Failed to get the interface for child folder '%s'.", NS_ConvertUTF16toUTF8(lastName).get());
           nsImportGenericMail::ReportError(IMPORT_ERROR_MB_FINDCHILD,
                                            lastName.get(),
                                            &error, pData->stringBundle);
           pData->fatalError = true;
           break;
         }
-
+        curFolder = subFolder;
         // Make sure this new parent folder obj has the correct subfolder list so far.
-        rv = ProxyGetSubFolders(subFolder, getter_AddRefs(enumerator));
+        rv = ProxyGetSubFolders(curFolder, getter_AddRefs(enumerator));
       }
       else if (newDepth < depth) {
         rv = NS_OK;
         while ((newDepth < depth) && NS_SUCCEEDED( rv)) {
           rv = curFolder->GetParent(getter_AddRefs(curFolder));
           if (NS_FAILED( rv)) {
             IMPORT_LOG1("*** ImportMailThread: Failed to get the interface for parent folder '%s'.", lastName.get());
             nsImportGenericMail::ReportError(IMPORT_ERROR_MB_FINDCHILD,