| 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 3600c5f5cdd41c4816669f6475e97ecfb57e4d19..124b278084b02757b18d296904bb554ce45957ae 100644
|
| --- a/chrome/browser/ui/webui/downloads_dom_handler.cc
|
| +++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
|
| @@ -356,10 +356,17 @@ void DownloadsDOMHandler::HandleOpenFile(const base::ListValue* args) {
|
| void DownloadsDOMHandler::HandleDrag(const base::ListValue* args) {
|
| CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_DRAG);
|
| content::DownloadItem* file = GetDownloadByValue(args);
|
| + if (!file)
|
| + return;
|
| +
|
| content::WebContents* web_contents = GetWebUIWebContents();
|
| // |web_contents| is only NULL in the test.
|
| - if (!file || !web_contents || !file->IsComplete())
|
| + if (!web_contents)
|
| return;
|
| +
|
| + if (file->GetState() != content::DownloadItem::COMPLETE)
|
| + return;
|
| +
|
| gfx::Image* icon = g_browser_process->icon_manager()->LookupIconFromFilepath(
|
| file->GetTargetFilePath(), IconLoader::NORMAL);
|
| gfx::NativeView view = web_contents->GetView()->GetNativeView();
|
|
|