summaryrefslogtreecommitdiffstats
path: root/chrome/browser/instant
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-12 17:54:43 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-12 17:54:43 +0000
commit8ecbc2b0762c780c7ef1129256ce2bfb78df84aa (patch)
tree03a090be57898532aba224e76880793dae5e2048 /chrome/browser/instant
parent97021d2ef34aadd0b3b24261acf470678023067a (diff)
downloadchromium_src-8ecbc2b0762c780c7ef1129256ce2bfb78df84aa.zip
chromium_src-8ecbc2b0762c780c7ef1129256ce2bfb78df84aa.tar.gz
chromium_src-8ecbc2b0762c780c7ef1129256ce2bfb78df84aa.tar.bz2
Add check to keep browser from crashing if renderer goes away at wrong time
BUG=75828 TEST=Turn off cookies, images and JS. Enable Instant. Type "foo" in addressbar. Make sure we don't crash. Review URL: http://codereview.chromium.org/6684017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant')
-rw-r--r--chrome/browser/instant/instant_loader.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 15c251e..7a058a5 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -394,8 +394,9 @@ void InstantLoader::TabContentsDelegateImpl::NavigationStateChanged(
// committed before waiting on paint as there is always an initial paint
// when a new renderer is created from the resize so that if we showed the
// preview after the first paint we would end up with a white rect.
- RegisterForPaintNotifications(
- source->GetRenderWidgetHostView()->GetRenderWidgetHost());
+ RenderWidgetHostView *rwhv = source->GetRenderWidgetHostView();
+ if (rwhv)
+ RegisterForPaintNotifications(rwhv->GetRenderWidgetHost());
} else if (source->is_crashed()) {
PreviewPainted();
}