diff options
-rw-r--r-- | android/src/com/mapswithme/maps/ugc/UGCEditorFragment.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/android/src/com/mapswithme/maps/ugc/UGCEditorFragment.java b/android/src/com/mapswithme/maps/ugc/UGCEditorFragment.java index 030503dc3a..230859ec3b 100644 --- a/android/src/com/mapswithme/maps/ugc/UGCEditorFragment.java +++ b/android/src/com/mapswithme/maps/ugc/UGCEditorFragment.java @@ -121,12 +121,16 @@ public class UGCEditorFragment extends BaseMwmAuthorizationFragment public void onSocialAuthenticationCancel(@Framework.AuthTokenType int type) { Statistics.INSTANCE.trackEvent(Statistics.EventName.UGC_AUTH_DECLINED); + if (isAdded()) + getActivity().finish(); } @Override public void onSocialAuthenticationError(int type, @Nullable String error) { Statistics.INSTANCE.trackUGCAuthFailed(type, error); + if (isAdded()) + getActivity().finish(); } private void onSubmitButtonClick() |