Commit b553de8a authored by csharp@chromium.org's avatar csharp@chromium.org

Fix Crash in KeyPressListenersHandleEvent

Prevent RenderWidgetHostView from calling KeyPressListenersHandleEvent on a NULL member.


BUG=118351
TEST=No more crashes in content::RenderWidgetHostImpl::KeyPressListenerHandleEvent


Review URL: http://codereview.chromium.org/9702070

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126948 0039d316-1c4b-4281-b951-d872f2087c98
parent 7e1b1849
...@@ -213,7 +213,8 @@ class RenderWidgetHostViewGtkWidget { ...@@ -213,7 +213,8 @@ class RenderWidgetHostViewGtkWidget {
host_view->is_fullscreen_; host_view->is_fullscreen_;
if (should_close_on_escape && GDK_Escape == event->keyval) { if (should_close_on_escape && GDK_Escape == event->keyval) {
host_view->host_->Shutdown(); host_view->host_->Shutdown();
} if (host_view->host_->KeyPressListenersHandleEvent(event)) { } if (host_view->host_ &&
host_view->host_->KeyPressListenersHandleEvent(event)) {
return TRUE; return TRUE;
} else { } else {
// Send key event to input method. // Send key event to input method.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment