Skip to content

Commit

Permalink
Fix for NPE when group selection fragment is no longer attached to ac…
Browse files Browse the repository at this point in the history
…tivity.
  • Loading branch information
moxie0 committed May 31, 2013
1 parent 0534f9d commit ad1d927
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
private void handleSelectionFinished() {
recipients = contactsFragment.getSelectedContacts();
recipients.append(recentFragment.getSelectedContacts());
recipients.append(groupsFragment.getSelectedContacts());
recipients.append(groupsFragment.getSelectedContacts(this));

Intent resultIntent = getIntent();
resultIntent.putExtra("recipients", this.recipients);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ private void initializeResources() {
this.getListView().setFocusable(true);
}

public Recipients getSelectedContacts() {
public Recipients getSelectedContacts(Context context) {
List<Recipient> recipientList = new LinkedList<Recipient>();

for (GroupData groupData : selectedGroups.values()) {
List<ContactData> contactDataList = ContactAccessor.getInstance()
.getGroupMembership(getActivity(), groupData.id);
.getGroupMembership(context, groupData.id);

Log.w("GroupSelectionListActivity", "Got contacts in group: " + contactDataList.size());

Expand Down

0 comments on commit ad1d927

Please sign in to comment.