diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 20:15:10 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 20:15:10 +0000 |
commit | 6949cb200f0d384ca79fc4e7275e608a56d6726f (patch) | |
tree | 770ea8453a9e6261a04997cfb4bdd9826c38c217 /views | |
parent | df6cbceab7b2409c3b2218c8f836681b2b0f1655 (diff) | |
download | chromium_src-6949cb200f0d384ca79fc4e7275e608a56d6726f.zip chromium_src-6949cb200f0d384ca79fc4e7275e608a56d6726f.tar.gz chromium_src-6949cb200f0d384ca79fc4e7275e608a56d6726f.tar.bz2 |
Fixes crash in dragging from download manager on chrome os.
BUG=36516
TEST=on chromeos drag from the download manager and make sure we don't
crash.
Review URL: http://codereview.chromium.org/660088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/widget/widget_gtk.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index 1dcc258..7cce516 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -180,7 +180,6 @@ void WidgetGtk::DoDrag(const OSExchangeData& data, int operation) { static_cast<const OSExchangeDataProviderGtk&>(data.provider()); GtkTargetList* targets = data_provider.GetTargetList(); GdkEvent* current_event = gtk_get_current_event(); - DCHECK(current_event); const OSExchangeDataProviderGtk& provider( static_cast<const OSExchangeDataProviderGtk&>(data.provider())); @@ -198,7 +197,8 @@ void WidgetGtk::DoDrag(const OSExchangeData& data, int operation) { provider.drag_image(), provider.cursor_offset_x(), provider.cursor_offset_y()); - gdk_event_free(current_event); + if (current_event) + gdk_event_free(current_event); gtk_target_list_unref(targets); drag_data_ = &data_provider; |