From 86e2dba4722a648301882565740f05b9e934c5c1 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Wed, 14 Oct 2015 10:58:35 -0400 Subject: [PATCH] bug 1213606 - work around proxy's that don't have a wrapper for their document r=davidb --- accessible/windows/msaa/Platform.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/accessible/windows/msaa/Platform.cpp b/accessible/windows/msaa/Platform.cpp index 74cc6d131acc..19cc1c28fa8b 100644 --- a/accessible/windows/msaa/Platform.cpp +++ b/accessible/windows/msaa/Platform.cpp @@ -61,14 +61,17 @@ a11y::ProxyDestroyed(ProxyAccessible* aProxy) auto doc = static_cast(WrapperFor(aProxy->Document())); + MOZ_ASSERT(doc); + if (doc) { #ifdef _WIN64 - uint32_t id = wrapper->GetExistingID(); - if (id != AccessibleWrap::kNoID) { - doc->RemoveID(id); - } + uint32_t id = wrapper->GetExistingID(); + if (id != AccessibleWrap::kNoID) { + doc->RemoveID(id); + } #else - doc->RemoveID(-reinterpret_cast(wrapper)); + doc->RemoveID(-reinterpret_cast(wrapper)); #endif + } wrapper->Shutdown(); aProxy->SetWrapper(0);