catch null content

This commit is contained in:
sonora 2016-11-20 11:19:05 +01:00 committed by Alexey Kulish
parent 9d5b24afbd
commit 2daa1a7c47

View file

@ -374,7 +374,7 @@ public class AmenityMenuBuilder extends MenuBuilder {
final String langSelected = lng; final String langSelected = lng;
String content = amenity.getDescription(langSelected); String content = amenity.getDescription(langSelected);
vl = Html.fromHtml(content).toString(); vl = (content != null) ? Html.fromHtml(content).toString() : "";
if (vl.length() > 300) { if (vl.length() > 300) {
vl = vl.substring(0, 300); vl = vl.substring(0, 300);
} }