Bug 674353 - Avoid using null pointer when trying to autocomplete. r=mak

This commit is contained in:
Josh Matthews 2012-01-26 14:15:58 -05:00
parent 9cf5e89521
commit 02f995556f

View File

@ -1391,7 +1391,7 @@ nsAutoCompleteController::ClearResults()
nsresult
nsAutoCompleteController::CompleteDefaultIndex(PRInt32 aResultIndex)
{
if (mDefaultIndexCompleted || mBackspaced || mSearchString.Length() == 0)
if (mDefaultIndexCompleted || mBackspaced || mSearchString.Length() == 0 || !mInput)
return NS_OK;
PRInt32 selectionStart;