From e0fc9843f20b5f0e3f4fcac9db9c475e087f0b57 Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 10 Nov 2014 14:29:48 +0200 Subject: [PATCH] Fixed issue with wrong context for dialog --- OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java index f4ff2726a1..65f4a51cd9 100644 --- a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java @@ -190,8 +190,9 @@ public class FavouritesDbHelper { } } } - if (index.length() > 0 || emoticons){ - AlertDialog.Builder builder = new AlertDialog.Builder(context); + if ((index.length() > 0 || emoticons)&& + context.getMapActivity() != null){ + AlertDialog.Builder builder = new AlertDialog.Builder(context.getMapActivity()); builder.setTitle(R.string.fav_point_dublicate); if (emoticons){ builder.setMessage(context.getString(R.string.fav_point_emoticons_message, name));