Merge "Prevent monkey crash with aggregation suggestion popup"
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 3869c54..2725d1f 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -1340,6 +1340,9 @@
final RawContactEditorView rawContactView =
(RawContactEditorView)getRawContactEditorView(mAggregationSuggestionsRawContactId);
+ if (rawContactView == null) {
+ return; // Raw contact deleted?
+ }
final View anchorView = rawContactView.findViewById(R.id.anchor_view);
mAggregationSuggestionPopup = new ListPopupWindow(mContext, null);
mAggregationSuggestionPopup.setAnchorView(anchorView);