Skip to content

Commit

Permalink
fix: Road graph plugin crash qgis when use spatelite as source layer
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15110 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
stopa85 committed Jan 31, 2011
1 parent fb872c3 commit 1a98b90
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/plugins/roadgraph/linevectorlayerdirector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ void RgLineVectorLayerDirector::makeGraph( RgGraphBuilder *builder ) const

builder->setSourceCrs( vl->crs() );
QgsAttributeList la;
la.push_back( mDirectionFieldId );
la.push_back( mSpeedFieldId );
if ( mDirectionFieldId != -1 )
{
la.push_back( mDirectionFieldId );
}
if ( mSpeedFieldId != -1 )
{
la.push_back( mSpeedFieldId );
}

SpeedUnit su = SpeedUnit::byName( mSpeedUnitName );

Expand Down

0 comments on commit 1a98b90

Please sign in to comment.