Fix crash in DownloadsDOMHandler::GetDownloadByValue

BUG=144877


Review URL: https://chromiumcodereview.appspot.com/10867077

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153511 0039d316-1c4b-4281-b951-d872f2087c98
parent 29bf9cfa
...@@ -514,7 +514,7 @@ content::DownloadItem* DownloadsDOMHandler::GetDownloadByValue( ...@@ -514,7 +514,7 @@ content::DownloadItem* DownloadsDOMHandler::GetDownloadByValue(
if (!ExtractIntegerValue(args, &id)) if (!ExtractIntegerValue(args, &id))
return NULL; return NULL;
content::DownloadItem* download_item = download_manager_->GetDownload(id); content::DownloadItem* download_item = download_manager_->GetDownload(id);
if (download_item == NULL) if (!download_item && original_profile_download_manager_)
download_item = original_profile_download_manager_->GetDownload(id); download_item = original_profile_download_manager_->GetDownload(id);
return download_item; return download_item;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment