Bug 716589 - crash nsDocAccessible::GetNativeWindow. r=tbsaunde

This commit is contained in:
David Bolter 2012-01-10 13:52:14 -05:00
Родитель af97d824a1
Коммит a94a663200
1 изменённых файлов: 11 добавлений и 6 удалений

Просмотреть файл

@ -1278,13 +1278,18 @@ void*
nsDocAccessible::GetNativeWindow() const
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
if (!shell)
return nsnull;
nsIViewManager* vm = shell->GetViewManager();
if (vm) {
nsCOMPtr<nsIWidget> widget;
vm->GetRootWidget(getter_AddRefs(widget));
if (widget)
return widget->GetNativeData(NS_NATIVE_WINDOW);
}
if (!vm)
return nsnull;
nsCOMPtr<nsIWidget> widget;
vm->GetRootWidget(getter_AddRefs(widget));
if (widget)
return widget->GetNativeData(NS_NATIVE_WINDOW);
return nsnull;
}