diff options
author | Maxim Pimenov <m@maps.me> | 2016-09-23 18:40:43 +0300 |
---|---|---|
committer | Maxim Pimenov <m@maps.me> | 2016-09-26 13:20:19 +0300 |
commit | 5e9ee80498a0ae978781bff123f8a8032fc9d342 (patch) | |
tree | 3a923d1ea54881fd8871895eb040efa5824532ce /indexer/osm_editor.cpp | |
parent | b97a8791ff701f30f9c801c36b7b0cb2fc4f7739 (diff) |
Review fixes.
Diffstat (limited to 'indexer/osm_editor.cpp')
-rw-r--r-- | indexer/osm_editor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indexer/osm_editor.cpp b/indexer/osm_editor.cpp index 64b650f894..1f2681caa8 100644 --- a/indexer/osm_editor.cpp +++ b/indexer/osm_editor.cpp @@ -1054,8 +1054,11 @@ FeatureID Editor::GenerateNewFeatureId(MwmSet::MwmId const & id) bool Editor::CreatePoint(uint32_t type, m2::PointD const & mercator, MwmSet::MwmId const & id, EditableMapObject & outFeature) { ASSERT(id.IsAlive(), ("Please check that feature is created in valid MWM file before calling this method.")); - CHECK(id.GetInfo()->m_limitRect.IsPointInside(mercator), - ("Attempt to create a feature outside of the MWM's bounding box.")); + if (!id.GetInfo()->m_limitRect.IsPointInside(mercator)) + { + LOG(LERROR, ("Attempt to create a feature outside of the MWM's bounding box.")); + return false; + } outFeature.SetMercator(mercator); outFeature.SetID(GenerateNewFeatureId(id)); outFeature.SetType(type); |