Check that the return value of CefClient::GetRenderHandler is non-NULL (issue #1504).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1995 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2015-01-26 00:57:01 +00:00
parent f38c620e28
commit d640978350
6 changed files with 73 additions and 45 deletions

View File

@ -419,10 +419,11 @@ void CefBrowserHostImpl::PlatformTranslateMouseEvent(
result.globalY = result.y;
if (IsWindowless()) {
GetClient()->GetRenderHandler()->GetScreenPoint(
GetBrowser(),
result.x, result.y,
result.globalX, result.globalY);
CefRefPtr<CefRenderHandler> handler = client_->GetRenderHandler();
if (handler.get()) {
handler->GetScreenPoint(this, result.x, result.y, result.globalX,
result.globalY);
}
} else if (window_x11_) {
const gfx::Point& origin = window_x11_->bounds().origin();
result.globalX += origin.x();