Don't try to toggle next button state when the fragment isn't attached

b/12886252

Change-Id: Ie19d8e946139d317f7e867449141dcfd82c510f8
This commit is contained in:
Tony Mantler 2014-02-04 10:03:08 -08:00
parent d7f3cebe50
commit d88f132147
1 changed files with 4 additions and 1 deletions

View File

@ -159,7 +159,10 @@ public class AccountSetupNamesFragment extends Fragment {
}
}
final AccountSetupFinal activity = (AccountSetupFinal) getActivity();
activity.setNextButtonEnabled(enableNextButton);
if (activity != null) {
// If we're not attached to the activity, this state probably doesn't need updating
activity.setNextButtonEnabled(enableNextButton);
}
}
public String getDescription() {