adding null check to prevent a few crashers on windows and linux that I introduced (exposed new code path). r=bryner

This commit is contained in:
saari%netscape.com 2000-06-23 22:18:54 +00:00
Родитель 63234a162b
Коммит 2d4bb8c980
2 изменённых файлов: 4 добавлений и 2 удалений

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

@ -453,7 +453,8 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
}
// Focus the DOM window.
focusedWindow->Focus();
if(focusedWindow)
focusedWindow->Focus();
if (focusedElement) {
nsCOMPtr<nsIContent> focusContent = do_QueryInterface(focusedElement);

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

@ -453,7 +453,8 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
}
// Focus the DOM window.
focusedWindow->Focus();
if(focusedWindow)
focusedWindow->Focus();
if (focusedElement) {
nsCOMPtr<nsIContent> focusContent = do_QueryInterface(focusedElement);