Bug 394198. Crash in nsDocAccessible::TakeFocus(). Patch by Evan Yan, r=aaronlev, a=dsicore. Leaving open for a better fix

This commit is contained in:
aaronleventhal@moonset.net 2007-09-05 06:40:57 -07:00
parent 7a564b521d
commit d220c5b23d

View File

@ -284,6 +284,10 @@ NS_IMETHODIMP nsDocAccessible::TakeFocus()
NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
nsCOMPtr<nsIPresShell> shell(GetPresShell());
if (!shell) {
NS_WARNING("Was not shutdown properly via InvalidateCacheSubtree()");
return NS_ERROR_FAILURE;
}
nsIEventStateManager *esm = shell->GetPresContext()->EventStateManager();
NS_ENSURE_TRUE(esm, NS_ERROR_FAILURE);