From fe65fc3ce8f1e08fe6aab481aa65c52c2ff29616 Mon Sep 17 00:00:00 2001 From: Denis Date: Sat, 10 Jan 2015 12:25:16 +0200 Subject: [PATCH] Added run on ui thread --- .../osmand/plus/dashboard/DashFavoritesFragment.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java index 2268e64816..ab22ff2282 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java @@ -258,6 +258,14 @@ public class DashFavoritesFragment extends DashBaseFragment implements Favourite @Override public void updateFavourites() { - setupFavorites(); + if (getActivity() == null) { + return; + } + getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + setupFavorites(); + } + }); } }