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

main
Jeff Hamilton 2009-08-18 11:53:22 -05:00
parent 9a66cd81e7
commit 10f1a4d39c
1 changed files with 3 additions and 1 deletions

View File

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