Add |client_| nullptr check in CefBrowserHostImpl::CanDragEnter (fixes issue #2934)

This commit is contained in:
Marshall Greenblatt 2020-05-13 14:30:44 -04:00
parent 7ecaa8afdd
commit 31d3e88d32
1 changed files with 4 additions and 2 deletions

View File

@ -2289,8 +2289,10 @@ bool CefBrowserHostImpl::PreHandleGestureEvent(
bool CefBrowserHostImpl::CanDragEnter(content::WebContents* source,
const content::DropData& data,
blink::WebDragOperationsMask mask) {
CefRefPtr<CefDragHandler> handler = client_->GetDragHandler();
if (handler.get()) {
CefRefPtr<CefDragHandler> handler;
if (client_)
handler = client_->GetDragHandler();
if (handler) {
CefRefPtr<CefDragDataImpl> drag_data(new CefDragDataImpl(data));
drag_data->SetReadOnly(true);
if (handler->OnDragEnter(