Fixing NPE on join contact activity.
The monkey hit Menu=>Join and then quickly Back.
By the time the async task was done and we were
ready to start the join activity, the editor activity
was already closed.
Bug: 3299389
Change-Id: Ib98f2dc9e815a123636f85972888f3b571841015
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 2326021..a26204f 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -871,7 +871,7 @@
* @param contactLookupUri the fresh URI for the currently edited contact (after saving it)
*/
private void showJoinAggregateActivity(Uri contactLookupUri) {
- if (contactLookupUri == null) {
+ if (contactLookupUri == null || !isAdded()) {
return;
}