From 5b42a2f53d3199d8821a009d08f27f22aed2da59 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Fri, 8 Jan 2021 11:12:01 +0300 Subject: [PATCH] Fix travel search crash --- .../src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java index 55c5e6ee32..45a8442614 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java @@ -83,7 +83,7 @@ public class TravelObfHelper implements TravelHelper { } @NonNull - public List loadPopularArticles() { + public synchronized List loadPopularArticles() { String lang = app.getLanguage(); List popularArticles = new ArrayList<>(); for (BinaryMapIndexReader reader : getReaders()) { @@ -190,7 +190,7 @@ public class TravelObfHelper implements TravelHelper { @NonNull @Override - public List search(@NonNull String searchQuery) { + public synchronized List search(@NonNull String searchQuery) { List res = new ArrayList<>(); Map> amenityMap = new HashMap<>(); final String appLang = app.getLanguage();