Fixed issue with wrong context for dialog

This commit is contained in:
Denis 2014-11-10 14:29:48 +02:00
parent bb695deaed
commit a7012e74ac

View file

@ -190,8 +190,9 @@ public class FavouritesDbHelper {
} }
} }
} }
if (index.length() > 0 || emoticons){ if ((index.length() > 0 || emoticons)&&
AlertDialog.Builder builder = new AlertDialog.Builder(context); context.getMapActivity() != null){
AlertDialog.Builder builder = new AlertDialog.Builder(context.getMapActivity());
builder.setTitle(R.string.fav_point_dublicate); builder.setTitle(R.string.fav_point_dublicate);
if (emoticons){ if (emoticons){
builder.setMessage(context.getString(R.string.fav_point_emoticons_message, name)); builder.setMessage(context.getString(R.string.fav_point_emoticons_message, name));