diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 5aa3013d9..813a78c34 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -2289,8 +2289,10 @@ bool CefBrowserHostImpl::PreHandleGestureEvent( bool CefBrowserHostImpl::CanDragEnter(content::WebContents* source, const content::DropData& data, blink::WebDragOperationsMask mask) { - CefRefPtr handler = client_->GetDragHandler(); - if (handler.get()) { + CefRefPtr handler; + if (client_) + handler = client_->GetDragHandler(); + if (handler) { CefRefPtr drag_data(new CefDragDataImpl(data)); drag_data->SetReadOnly(true); if (handler->OnDragEnter(