fix for top crasher bug #395344: Topcrash typing in the address bar / search box [@ nsAutoCompleteController::HandleText] r=gavin

This commit is contained in:
sspitzer@mozilla.org 2007-09-19 14:16:34 -07:00
Родитель af1bfb4592
Коммит 8f98ca93c9
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -221,6 +221,13 @@ nsAutoCompleteController::HandleText(PRBool aIgnoreSelection)
// Stop all searches in case they are async.
StopSearch();
if (!mInput) {
// StopSearch() can call PostSearchCleanup() which might result
// in a blur event, which could null out mInput, so we need to check it
// again. See bug #395344 for more details
return NS_OK;
}
PRBool disabled;
mInput->GetDisableAutoComplete(&disabled);
NS_ENSURE_TRUE(!disabled, NS_OK);