Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3679)

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.cc

Issue 10867077: Fix crash in DownloadsDOMHandler::GetDownloadByValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 9edecf9d4dac50205bef2beaac2d3606c3b4181f..a74090da3dae2877750e5f95e7f91d2a945e74c8 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -514,7 +514,8 @@ content::DownloadItem* DownloadsDOMHandler::GetDownloadByValue(
if (!ExtractIntegerValue(args, &id))
return NULL;
content::DownloadItem* download_item = download_manager_->GetDownload(id);
- if (download_item == NULL)
+ if ((download_item == NULL) &&
+ (original_profile_download_manager_ != NULL))
James Hawkins 2012/08/27 13:33:06 Optional nit: This is much shorter (and easier to
benjhayden 2012/08/27 14:50:39 Done.
download_item = original_profile_download_manager_->GetDownload(id);
return download_item;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698