From 31d3e88d32288fe99d0068a25d2dd6200da76ce7 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 13 May 2020 14:30:44 -0400 Subject: [PATCH] Add |client_| nullptr check in CefBrowserHostImpl::CanDragEnter (fixes issue #2934) --- libcef/browser/browser_host_impl.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(