Merge "SearchDialog: Fix for NullpointerException while using Suggestions in Browser"

This commit is contained in:
Jean-Baptiste Queru
2010-11-22 13:40:29 -08:00
committed by Android Code Review

View File

@ -1107,6 +1107,9 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
* @return true if a successful launch, false if could not (e.g. bad position).
*/
protected boolean launchSuggestion(int position, int actionKey, String actionMsg) {
if (mSuggestionsAdapter == null) {
return false;
}
Cursor c = mSuggestionsAdapter.getCursor();
if ((c != null) && c.moveToPosition(position)) {