diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-30 19:33:33 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-30 19:33:33 +0000 |
commit | df06096817e6fc5a4a3e53b863cd4c439271ba45 (patch) | |
tree | 79f04aa8bc7351d27ed8856e74f581f334ed06d0 /chrome | |
parent | 6c02000d1035efb908edf97dac10225e7b418c17 (diff) | |
download | chromium_src-df06096817e6fc5a4a3e53b863cd4c439271ba45.zip chromium_src-df06096817e6fc5a4a3e53b863cd4c439271ba45.tar.gz chromium_src-df06096817e6fc5a4a3e53b863cd4c439271ba45.tar.bz2 |
Fix 3011: Accessibility crash on teardown of HWNDViewContainer
http://code.google.com/p/chromium/issues/detail?id=3011
Looks like we are trying to access the HWND of a window during teardown of the window.
Review URL: http://codereview.chromium.org/6015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/views/accessibility/view_accessibility.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/views/accessibility/view_accessibility.cc b/chrome/views/accessibility/view_accessibility.cc index ab196ba..2790bb1 100644 --- a/chrome/views/accessibility/view_accessibility.cc +++ b/chrome/views/accessibility/view_accessibility.cc @@ -109,6 +109,13 @@ STDMETHODIMP ViewAccessibility::get_accParent(IDispatch** disp_parent) { ChromeViews::View* parent = view_->GetParent(); if (!parent) { + // This function can get called during teardown of HWNDViewContainer so + // we should bail out if we fail to get the HWND. + if (!view_->GetViewContainer() || !view_->GetViewContainer()->GetHWND()) { + *disp_parent = NULL; + return S_FALSE; + } + // For a View that has no parent (e.g. root), point the accessible parent to // the default implementation, to interface with Windows' hierarchy and to // support calls from e.g. WindowFromAccessibleObject. |