summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-06 20:44:09 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-06 20:44:09 +0000
commit7b4981ebb0181c44c3ed004f7389617cae8d2b41 (patch)
tree682f8b51c531c5c0c3d86ec3bd4295772a0e1f95 /chrome/browser/renderer_host
parent615692439512c071103d1e4418b187c4e30bac45 (diff)
downloadchromium_src-7b4981ebb0181c44c3ed004f7389617cae8d2b41.zip
chromium_src-7b4981ebb0181c44c3ed004f7389617cae8d2b41.tar.gz
chromium_src-7b4981ebb0181c44c3ed004f7389617cae8d2b41.tar.bz2
Check for null pointer that can occur when tab is closed quickly after
opening. Fixes crash and fixes BrowserKeyEventsTest.ReservedAccelerators. BUG=none TEST=BrowserKeyEventsTest.ReservedAccelerators TBR=sky Review URL: http://codereview.chromium.org/2038002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc
index f7819e2..34d09b2 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc
@@ -1496,8 +1496,10 @@ void RenderWidgetHostViewWin::Observe(NotificationType type,
RenderProcessHost* render_process_host =
Source<RenderProcessHost>(source).ptr();
DCHECK(render_process_host);
- if (render_process_host != render_widget_host_->process())
+ if (render_widget_host_ == NULL ||
+ render_process_host != render_widget_host_->process()) {
return;
+ }
// If it was our RenderProcessHost that posted the notification,
// clear the BrowserAccessibilityManager, because the renderer is