diff --git a/src/com/android/inputmethod/latin/ContactsDictionary.java b/src/com/android/inputmethod/latin/ContactsDictionary.java index 09cbd43e9..cfa1f1d7d 100644 --- a/src/com/android/inputmethod/latin/ContactsDictionary.java +++ b/src/com/android/inputmethod/latin/ContactsDictionary.java @@ -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; }