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

Unified Diff: chrome/browser/download/download_util.cc

Issue 9791024: Check for null widget in DragDownload which is causing the crash in the bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 9 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/download/download_util.cc
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index ef25a03d2e1c39a6b0fef5f4efcbd99bd58ade1a..d1eb22ad018f4a26285261912ee681a8fceddb6d 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -398,6 +398,11 @@ void DragDownload(const DownloadItem* download,
#if !defined(TOOLKIT_USES_GTK)
views::Widget* widget = views::Widget::GetWidgetForNativeView(view);
+ // TODO(varunjain): Widget should not be NULL here. But its causing the crash
+ // in http://code.google.com/p/chromium/issues/detail?id=120430 Find out why.
+ if (!widget || !widget->native_widget())
+ return;
+
gfx::Point location = gfx::Screen::GetCursorScreenPoint();
// We do not care about notifying the DragItemView on completion of drag. So
// we pass NULL to RunShellDrag for the source view.
« 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