diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenu.java index e0fec04f8d..c56dda3e6f 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenu.java @@ -1,5 +1,7 @@ package net.osmand.plus.mapcontextmenu.other; +import android.support.v4.app.Fragment; + import net.osmand.plus.activities.MapActivity; import net.osmand.plus.mapcontextmenu.BaseMenuController; @@ -10,7 +12,10 @@ public class DestinationReachedMenu extends BaseMenuController { } public static void show(MapActivity mapActivity) { - DestinationReachedMenu menu = new DestinationReachedMenu(mapActivity); - DestinationReachedMenuFragment.showInstance(menu); + Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(DestinationReachedMenuFragment.TAG); + if (fragment == null || fragment.isDetached()) { + DestinationReachedMenu menu = new DestinationReachedMenu(mapActivity); + DestinationReachedMenuFragment.showInstance(menu); + } } }