summaryrefslogtreecommitdiffstats
path: root/chrome/profile_import
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 02:01:41 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 02:01:41 +0000
commit018305930db3869912ee7bd41214a04c87b0874a (patch)
tree383f45c4d36fb3c57be349c3786962b79209ece1 /chrome/profile_import
parentd7e3e9b8daf3bf3b728b20ce146b7d59d309cdd6 (diff)
downloadchromium_src-018305930db3869912ee7bd41214a04c87b0874a.zip
chromium_src-018305930db3869912ee7bd41214a04c87b0874a.tar.gz
chromium_src-018305930db3869912ee7bd41214a04c87b0874a.tar.bz2
Coverity: Fix ProfileImportThread::OnImportStart dereferencing importer_ before null check.
CID=9433 TEST=none BUG=none Review URL: http://codereview.chromium.org/2943012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/profile_import')
-rw-r--r--chrome/profile_import/profile_import_thread.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/profile_import/profile_import_thread.cc b/chrome/profile_import/profile_import_thread.cc
index 4a7ca13..4fa7cc3a 100644
--- a/chrome/profile_import/profile_import_thread.cc
+++ b/chrome/profile_import/profile_import_thread.cc
@@ -49,16 +49,16 @@ void ProfileImportThread::OnImportStart(
ImporterList importer_list;
importer_ = importer_list.CreateImporterByType(profile_info.browser_type);
- importer_->AddRef(); // Balanced in Cleanup().
- importer_->set_import_to_bookmark_bar(import_to_bookmark_bar);
- items_to_import_ = items;
-
if (!importer_) {
Send(new ProfileImportProcessHostMsg_Import_Finished(false,
"Importer could not be created."));
return;
}
+ importer_->AddRef(); // Balanced in Cleanup().
+ importer_->set_import_to_bookmark_bar(import_to_bookmark_bar);
+ items_to_import_ = items;
+
// Create worker thread in which importer runs.
import_thread_.reset(new base::Thread("import_thread"));
base::Thread::Options options;