Merge pull request #10084 from osmandapp/fix_import_favorites_icon

Fix "null" import favorites icon
This commit is contained in:
Vitaliy 2020-10-26 15:45:29 +02:00 committed by GitHub
commit 44d6afd2b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -670,7 +670,10 @@ public class ImportHelper {
}
fp.setAddress(p.getExtensionsToRead().get("address"));
fp.setColor(p.getColor(0));
fp.setIconIdFromName(app, p.getIconName());
String iconName = p.getIconName();
if (iconName != null) {
fp.setIconIdFromName(app, iconName);
}
fp.setBackgroundType(BackgroundType.getByTypeName(p.getBackgroundType(), DEFAULT_BACKGROUND_TYPE));
favourites.add(fp);
}