forked from organicmaps/organicmaps
RouteFollower crash fix on change routing engine.
This commit is contained in:
parent
f2e1241efa
commit
10e94e1137
2 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -110,6 +110,7 @@ public:
|
|||
inline void SetRoutingSettings(RoutingSettings const & routingSettings)
|
||||
{
|
||||
m_routingSettings = routingSettings;
|
||||
Update();
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue