Merge "Fix NPE in GroupNameDialogFragment"
diff --git a/src/com/android/contacts/interactions/GroupNameDialogFragment.java b/src/com/android/contacts/interactions/GroupNameDialogFragment.java
index 93500be..3c65562 100644
--- a/src/com/android/contacts/interactions/GroupNameDialogFragment.java
+++ b/src/com/android/contacts/interactions/GroupNameDialogFragment.java
@@ -76,7 +76,10 @@
@Override
public void afterTextChanged(Editable s) {
AlertDialog dialog = (AlertDialog) getDialog();
- updateOkButtonState(dialog);
+ // Make sure the dialog has not already been dismissed or destroyed.
+ if (dialog != null) {
+ updateOkButtonState(dialog);
+ }
}
private void updateOkButtonState(AlertDialog dialog) {