Commit 8b2e2f6f authored by Alexander Wiebel's avatar Alexander Wiebel

[FIX] avoid segfault if no candidates are there

parent 7291ae2f
......@@ -298,6 +298,7 @@ void WMPickingDVR::moduleMain()
|| !m_pickInProgress )
{
m_curve3D = m_visiTrace.getLine();
debugLog() << "Obtained line with " << m_curve3D.size() << " elements.";
updateCurveRendering();
}
......@@ -626,7 +627,6 @@ std::vector< std::pair< double, WPosition > > WMPickingDVR::computeVisiTraceCand
}
std::vector< std::pair< double, WPosition > > candidates( 0 );
std::cout << vecIndicesLowerBounds.size() << " - " << opacityJumps.size() << std::endl;
for( size_t id = 0; id < opacityJumps.size(); ++id )
{
candidates.push_back( std::make_pair( opacityJumps[id], samples[vecIndicesLowerBounds[id]].second ) );
......
......@@ -103,6 +103,12 @@ std::vector< std::vector< int > > WVisiTrace::getInverseLinearizedNodesRefs() co
void WVisiTrace::performDijkstra()
{
// Check if there is something to do
if( m_candidatePositions.size() == 0 || m_candidateJumps.size() == 0 )
{
return;
}
//using namespace boost;
typedef boost::adjacency_list< boost::listS, boost::vecS, boost::directedS,
boost::no_property, boost::property< boost::edge_weight_t, double > > graph_t;
......
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