summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorli.yin@intel.com <li.yin@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-05 04:59:38 +0000
committerli.yin@intel.com <li.yin@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-05 04:59:38 +0000
commit72b8419da0f7e93ff0a44fd64dd62aa01b6d4928 (patch)
tree46045697579f5671046b9470ce37912061283c61
parent630a8b33a1c9bcc369a4666407122ab8d643f13b (diff)
downloadchromium_src-72b8419da0f7e93ff0a44fd64dd62aa01b6d4928.zip
chromium_src-72b8419da0f7e93ff0a44fd64dd62aa01b6d4928.tar.gz
chromium_src-72b8419da0f7e93ff0a44fd64dd62aa01b6d4928.tar.bz2
Fix DownloadManager crash when DownloadManagerDelegate isn't set
BUG= Review URL: https://codereview.chromium.org/100753003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238896 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/download/download_manager_impl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index ea0f305..35825d3 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -413,7 +413,7 @@ void DownloadManagerImpl::StartDownloadWithId(
file_factory_->CreateFile(
info->save_info.Pass(), default_download_directory,
info->url(), info->referrer_url,
- delegate_->GenerateFileHash(),
+ delegate_ && delegate_->GenerateFileHash(),
stream.Pass(), download->GetBoundNetLog(),
download->DestinationObserverAsWeakPtr()));