Fixing NPE in contact list loading

The issue arises when the load of the contact
filters is so quick that it completes before
the list fragment is started.

Bug: 3156609
Change-Id: I591e0fda4541412f99030775804d34822777ba77
diff --git a/src/com/android/contacts/list/ContactEntryListFragment.java b/src/com/android/contacts/list/ContactEntryListFragment.java
index 46597d1..6ec43f8 100644
--- a/src/com/android/contacts/list/ContactEntryListFragment.java
+++ b/src/com/android/contacts/list/ContactEntryListFragment.java
@@ -305,6 +305,11 @@
     }
 
     protected void startLoading() {
+        if (mAdapter == null) {
+            // The method was called before the fragment was started
+            return;
+        }
+
         configureAdapter();
         int partitionCount = mAdapter.getPartitionCount();
         for (int i = 0; i < partitionCount; i++) {