Commit f1498538 authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Fix crash with Yours (number of turn points and segments can differ)

parent 73ab5606
......@@ -312,7 +312,7 @@ void RoutingLayerPrivate::renderRoute( GeoPainter *painter )
return;
}
Q_ASSERT( m_routingModel->rowCount() == m_routingModel->route().size() );
if( m_routingModel->rowCount() == m_routingModel->route().size() ) {
m_instructionRegions.clear();
for ( int i = 0; i < m_routingModel->rowCount(); ++i ) {
QModelIndex index = m_routingModel->index( i, 0 );
......@@ -342,6 +342,7 @@ void RoutingLayerPrivate::renderRoute( GeoPainter *painter )
m_instructionRegions.push_front( ModelRegion( index, region ) );
}
}
}
if( !m_routingModel->deviatedFromRoute() ) {
GeoDataCoordinates location = m_routingModel->route().currentSegment().nextRouteSegment().maneuver().position();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment