Don't crash if the contacts provider returns a null Cursor.

This commit is contained in:
Jeff Hamilton 2009-08-18 11:53:22 -05:00
parent 9a66cd81e7
commit 10f1a4d39c

View file

@ -67,7 +67,9 @@ public class ContactsDictionary extends ExpandableDictionary {
private synchronized void loadDictionary() {
Cursor cursor = getContext().getContentResolver()
.query(People.CONTENT_URI, PROJECTION, null, null, null);
addWords(cursor);
if (cursor != null) {
addWords(cursor);
}
mRequiresReload = false;
}