From a92550e1ca8673ccd1d1c2a2c56182f5eaa82923 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 4 Apr 2017 19:34:22 +0200 Subject: [PATCH] Fix NPE --- OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java index 4a02b5742d..33ecb85e71 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java @@ -214,7 +214,8 @@ public class BasicEditPoiFragment extends BaseOsmAndFragment if (!data.isInEdit()) { String openingHoursString = openingHours.toString(); if (!TextUtils.isEmpty(openingHoursString)) { - if(!OpeningHoursParser.parseOpenedHoursHandleErrors(openingHours.getOriginal()).toString().equals(openingHoursString)) { + if(openingHours.getOriginal() == null || + !OpeningHoursParser.parseOpenedHoursHandleErrors(openingHours.getOriginal()).toString().equals(openingHoursString)) { data.putTag(OSMSettings.OSMTagKey.OPENING_HOURS.getValue(), openingHoursString); }