diff --git a/accessible/base/DocManager.cpp b/accessible/base/DocManager.cpp index 7557ab6b8ce7..1ac71b06bedc 100644 --- a/accessible/base/DocManager.cpp +++ b/accessible/base/DocManager.cpp @@ -92,10 +92,10 @@ DocManager::RemoveFromXPCDocumentCache(DocAccessible* aDocument) if (xpcDoc) { xpcDoc->Shutdown(); mXPCDocumentCache.Remove(aDocument); - } - if (!HasXPCDocuments()) { - MaybeShutdownAccService(nsAccessibilityService::eXPCOM); + if (!HasXPCDocuments()) { + MaybeShutdownAccService(nsAccessibilityService::eXPCOM); + } } }