diff options
author | hshi@google.com <hshi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-05 23:37:02 +0000 |
---|---|---|
committer | hshi@google.com <hshi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-05 23:37:02 +0000 |
commit | efc117fe548c1cc82418b2e939120f3efe287ef0 (patch) | |
tree | 6507e43a75b289dc67a8cc18e54252112d86b17d | |
parent | 8884875d396f3cecc9084b95b0a22e06cf487771 (diff) | |
download | chromium_src-efc117fe548c1cc82418b2e939120f3efe287ef0.zip chromium_src-efc117fe548c1cc82418b2e939120f3efe287ef0.tar.gz chromium_src-efc117fe548c1cc82418b2e939120f3efe287ef0.tar.bz2 |
renderer_host: add a NULL pointer check.
If the root window is NULL then a SIGSEGV may occur in RootWindow::GetCompositorLock()
invoked by the constructor of ResizeLock object in RenderWidgetHostViewAura::SetBounds().
BUG=chrome-os-partner:13471
Review URL: https://chromiumcodereview.appspot.com/10911114
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155053 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_aura.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index dd25b2e..ca54357 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -323,8 +323,11 @@ void RenderWidgetHostViewAura::SetSize(const gfx::Size& size) { void RenderWidgetHostViewAura::SetBounds(const gfx::Rect& rect) { if (window_->bounds().size() != rect.size() && host_->is_accelerated_compositing_active()) { - resize_locks_.push_back(make_linked_ptr( - new ResizeLock(window_->GetRootWindow(), rect.size()))); + aura::RootWindow* root_window = window_->GetRootWindow(); + if (root_window) { + resize_locks_.push_back(make_linked_ptr( + new ResizeLock(root_window, rect.size()))); + } } window_->SetBounds(rect); host_->WasResized(); |