Merge "Silently give up split action when mState is null"
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);
}