fixed nullpointer in cardform
@@ -228,18 +228,14 @@ public class CheckoutActivity extends PXActivity<CheckoutPresenter>
final FragmentManager supportFragmentManager = getSupportFragmentManager();
- Fragment fragment = supportFragmentManager.findFragmentByTag(TAG_ONETAP_FRAGMENT);
-
- if (fragment == null) {
- fragment = ExpressPaymentFragment.getInstance();
- }
-
- getSupportFragmentManager()
+ if (supportFragmentManager.findFragmentByTag(TAG_ONETAP_FRAGMENT) == null) {
+ supportFragmentManager
.beginTransaction()
.setCustomAnimations(R.anim.px_slide_right_to_left_in, R.anim.px_slide_right_to_left_out)
- .replace(R.id.one_tap_fragment, fragment, TAG_ONETAP_FRAGMENT)
+ .replace(R.id.one_tap_fragment, ExpressPaymentFragment.getInstance(), TAG_ONETAP_FRAGMENT)
.commitNowAllowingStateLoss();
}
+ }
@Override
public void hideProgress() {
