Fixed issue with wrong context for dialog

This commit is contained in:
Denis 2014-11-10 14:29:48 +02:00
parent 79cc69df46
commit e0fc9843f2

View file

@ -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));