RouteFollower crash fix on change routing engine.

This commit is contained in:
Lev Dragunov 2015-08-07 14:43:44 +03:00 committed by Alex Zolotarev
parent f2e1241efa
commit 10e94e1137
2 changed files with 6 additions and 0 deletions

View file

@ -300,6 +300,11 @@ void Route::Update()
MakeBackInsertFunctor(points));
m_pedestrianFollower = RouteFollower(points.begin(), points.end());
}
else
{
// Free memory if we need no this geometry.
m_pedestrianFollower = RouteFollower();
}
size_t n = m_poly.GetSize();
ASSERT_GREATER(n, 1, ());
--n;

View file

@ -110,6 +110,7 @@ public:
inline void SetRoutingSettings(RoutingSettings const & routingSettings)
{
m_routingSettings = routingSettings;
Update();
}
private: