Fix NPE in GroupEditorFragment name checks

- We need a valid group name when we save the editor, so
we read the group name text view before saving. However
this is throwing a NPE because now the group name text view
is not retrieved until we've selected an account (new group
creation) or loaded the account (existing groups) and
determined which layout we're inflating.

- So there's a period of time where it's possible the
group name text view variable is null, so verify
it's not null before checking if the name string is valid.
If the text view is null, then we'll abort the save group
procedure early.

Bug: 5090543
Bug: 5091206

Change-Id: I1d768ad3b0c1f11a56de5c7f9c476b5176e5c3ed
diff --git a/src/com/android/contacts/group/GroupEditorFragment.java b/src/com/android/contacts/group/GroupEditorFragment.java
index 96fb4b8..ccc84a2 100644
--- a/src/com/android/contacts/group/GroupEditorFragment.java
+++ b/src/com/android/contacts/group/GroupEditorFragment.java
@@ -562,11 +562,12 @@
     }
 
     private boolean hasValidGroupName() {
-        return !TextUtils.isEmpty(mGroupNameView.getText());
+        return mGroupNameView != null && !TextUtils.isEmpty(mGroupNameView.getText());
     }
 
     private boolean hasNameChange() {
-        return !mGroupNameView.getText().toString().equals(mOriginalGroupName);
+        return mGroupNameView != null &&
+                !mGroupNameView.getText().toString().equals(mOriginalGroupName);
     }
 
     private boolean hasMembershipChange() {