From b957d93f3d1d0de5772b8ddcacacf6b380ddd065 Mon Sep 17 00:00:00 2001 From: rsudev Date: Mon, 27 Jan 2014 10:15:26 +0100 Subject: Fixes #3572, Context is not an instance of MapActivity - re-instantiate checking current mapsource against expected mapsource --- main/src/cgeo/geocaching/maps/CGeoMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/src') diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index bcc99a2..876652b 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -801,7 +801,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto * @return true if a restart is needed, false otherwise */ private boolean changeMapSource(final MapSource mapSource) { - final boolean restartRequired = !MapProviderFactory.isSameActivity(Settings.getMapSource(), mapSource); + final boolean restartRequired = !MapProviderFactory.isSameActivity(MapProviderFactory.getMapSource(currentSourceId), mapSource); Settings.setMapSource(mapSource); currentSourceId = mapSource.getNumericalId(); -- cgit v1.1