Fix DCHECK when mouse wheel deltas are 0 (issue #2515)

This commit is contained in:
Marshall Greenblatt 2018-09-27 14:17:48 +02:00
parent ce3a5d5a7b
commit 01ef24d928
1 changed files with 5 additions and 0 deletions

View File

@ -1213,6 +1213,11 @@ void CefBrowserHostImpl::SendMouseMoveEvent(const CefMouseEvent& event,
void CefBrowserHostImpl::SendMouseWheelEvent(const CefMouseEvent& event, void CefBrowserHostImpl::SendMouseWheelEvent(const CefMouseEvent& event,
int deltaX, int deltaX,
int deltaY) { int deltaY) {
if (deltaX == 0 && deltaY == 0) {
// Nothing to do.
return;
}
if (!CEF_CURRENTLY_ON_UIT()) { if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, CEF_POST_TASK(CEF_UIT,
base::BindOnce(&CefBrowserHostImpl::SendMouseWheelEvent, this, base::BindOnce(&CefBrowserHostImpl::SendMouseWheelEvent, this,