Fix crash in quicksearch keypress handling.