From 4e55ebfcd3f2c60d628743724095eed82c558066 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 28 Feb 2020 13:15:10 +0200 Subject: [PATCH] Fix free plugins availability --- OsmAnd/src/net/osmand/plus/OsmandPlugin.java | 2 +- OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java index 5e5d4afedd..5cd53c72db 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java +++ b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java @@ -294,7 +294,7 @@ public abstract class OsmandPlugin { } protected boolean pluginAvailable(OsmandApplication app) { - return checkPluginPackage(app, this); + return checkPluginPackage(app, this) || !isPaid(); } public static boolean checkPluginPackage(@NonNull OsmandApplication app, @NonNull OsmandPlugin plugin) { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java index 62070b42b2..0760b9839e 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java @@ -335,6 +335,9 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider } protected void onPostExecute(OsmBugResult obj) { + if (activity == null || activity.isFinishing() || activity.isActivityDestroyed()) { + return; + } if (obj != null && obj.warning == null) { if (local == osmbugsUtil) { Toast.makeText(activity, R.string.osm_changes_added_to_local_edits, Toast.LENGTH_LONG).show();