From 3d9ffcb6ececbc5bbd91f799547d4a056670f45e Mon Sep 17 00:00:00 2001 From: Dmitry Yunitsky Date: Wed, 25 May 2016 17:04:44 +0300 Subject: [PATCH] [android] Crashfix. --- .../com/mapswithme/maps/editor/OsmAuthFragmentDelegate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/com/mapswithme/maps/editor/OsmAuthFragmentDelegate.java b/android/src/com/mapswithme/maps/editor/OsmAuthFragmentDelegate.java index 2cd4f3818a..200bb0137a 100644 --- a/android/src/com/mapswithme/maps/editor/OsmAuthFragmentDelegate.java +++ b/android/src/com/mapswithme/maps/editor/OsmAuthFragmentDelegate.java @@ -88,7 +88,8 @@ public abstract class OsmAuthFragmentDelegate implements View.OnClickListener } OsmOAuth.setAuthorization(auth[0], auth[1], username); - Utils.navigateToParent(mFragment.getActivity()); + if (mFragment.isAdded()) + Utils.navigateToParent(mFragment.getActivity()); Statistics.INSTANCE.trackEvent(Statistics.EventName.EDITOR_AUTH_REQUEST_RESULT, Statistics.params().add(Statistics.EventParam.IS_SUCCESS, true).add(Statistics.EventParam.TYPE, type.name)); }