Commit 7d75a031 authored by mgiuca@chromium.org's avatar mgiuca@chromium.org

Added NULL check in WebContentsViewAura when commencing a drag.

This prevents a crash if a WebContents has no WebContentsDelegate.

BUG=391202

Review URL: https://codereview.chromium.org/395753002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283682 0039d316-1c4b-4281-b951-d872f2087c98
parent c6124b76
...@@ -1493,9 +1493,9 @@ void WebContentsViewAura::OnDragEntered(const ui::DropTargetEvent& event) { ...@@ -1493,9 +1493,9 @@ void WebContentsViewAura::OnDragEntered(const ui::DropTargetEvent& event) {
blink::WebDragOperationsMask op = ConvertToWeb(event.source_operations()); blink::WebDragOperationsMask op = ConvertToWeb(event.source_operations());
// Give the delegate an opportunity to cancel the drag. // Give the delegate an opportunity to cancel the drag.
if (!web_contents_->GetDelegate()->CanDragEnter(web_contents_, if (web_contents_->GetDelegate() &&
*current_drop_data_.get(), !web_contents_->GetDelegate()->CanDragEnter(
op)) { web_contents_, *current_drop_data_.get(), op)) {
current_drop_data_.reset(NULL); current_drop_data_.reset(NULL);
return; return;
} }
......
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