diff --git a/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/base/BaseFragment.java b/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/base/BaseFragment.java index 935ebf827..270b6539e 100644 --- a/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/base/BaseFragment.java +++ b/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/base/BaseFragment.java @@ -51,11 +51,15 @@ public void hideSwipeProgress() { } protected void showProgressDialog(String message) { - callback.showProgressDialog(message); + if (callback != null) { + callback.showProgressDialog(message); + } } protected void hideProgressDialog() { - callback.hideProgressDialog(); + if (callback != null) { + callback.hideProgressDialog(); + } } protected void setSwipeEnabled(boolean enabled) { diff --git a/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/kyc/ui/KYCDescriptionFragment.java b/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/kyc/ui/KYCDescriptionFragment.java index 7d87cb37b..1e3c60c30 100644 --- a/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/kyc/ui/KYCDescriptionFragment.java +++ b/mifospay/src/main/java/org/mifos/mobilewallet/mifospay/kyc/ui/KYCDescriptionFragment.java @@ -186,10 +186,12 @@ public void showToast(String message) { @Override public void gotoHome() { - Intent intent = new Intent(getActivity(), MainActivity.class); - intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | - Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); - startActivity(intent); + if(getActivity()!=null) { + Intent intent = new Intent(getActivity(), MainActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | + Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); + startActivity(intent); + } } @Override