Silently give up split action when mState is null

mState may be null if the Fragment is recreated (or in the other
strange state) by the system during split confirmation, which is
really rare for users (while it may happen during automated
testing). Avoid NPE and give up the save action silently.

Bug: 5220440
Change-Id: I40c9a29ef1f3c1a3913beb9f3a8022b00d297102
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 87fcfe0..21ac3bb 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -1658,6 +1658,15 @@
 
     @Override
     public void onSplitContactConfirmed() {
+        if (mState == null) {
+            // This may happen when this Fragment is recreated by the system during users
+            // confirming the split action (and thus this method is called just before onCreate()),
+            // for example.
+            Log.e(TAG, "mState became null during the user's confirming split action. " +
+                    "Cannot perform the save action.");
+            return;
+        }
+
         mState.markRawContactsForSplitting();
         save(SaveMode.SPLIT);
     }