Skip to content

Commit

Permalink
Fix a possible crash in network analyser
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 9, 2018
1 parent 67a8902 commit 70785f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/analysis/network/qgsgraphanalyzer.cpp
Expand Up @@ -24,6 +24,12 @@

void QgsGraphAnalyzer::dijkstra( const QgsGraph *source, int startPointIdx, int criterionNum, QVector<int> *resultTree, QVector<double> *resultCost )
{
if ( startPointIdx < 0 || startPointIdx >= source->vertexCount() )
{
// invalid start point
return;
}

QVector< double > *result = nullptr;
if ( resultCost )
{
Expand Down

0 comments on commit 70785f8

Please sign in to comment.