diff options
Diffstat (limited to 'java/com/android/dialer/searchfragment/directories')
-rw-r--r-- | java/com/android/dialer/searchfragment/directories/DirectoriesCursorLoader.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/com/android/dialer/searchfragment/directories/DirectoriesCursorLoader.java b/java/com/android/dialer/searchfragment/directories/DirectoriesCursorLoader.java index dbe11dd96..4d7ea3f3d 100644 --- a/java/com/android/dialer/searchfragment/directories/DirectoriesCursorLoader.java +++ b/java/com/android/dialer/searchfragment/directories/DirectoriesCursorLoader.java @@ -71,6 +71,11 @@ public final class DirectoriesCursorLoader extends CursorLoader { * @return A list of directories. */ public static List<Directory> toDirectories(Cursor cursor) { + if (cursor == null) { + LogUtil.i("DirectoriesCursorLoader.toDirectories", "Cursor was null"); + return new ArrayList<>(); + } + List<Directory> directories = new ArrayList<>(); cursor.moveToPosition(-1); while (cursor.moveToNext()) { |