Skip to content

Commit

Permalink
Do not crash if no valid points are found when importing a surface .d…
Browse files Browse the repository at this point in the history
…at file due to i.e. incorrect file format (comma separated, not space separated)
  • Loading branch information
jonjenssen committed Mar 12, 2024
1 parent fb5758a commit f411b5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
}
}

if ( surfacePoints.size() == 0 ) return { {}, {} };

// Determine axes vectors
std::vector<std::pair<cvf::Vec2d, unsigned>> pairs;
for ( auto itr = axesVectorCandidatesNum.begin(); itr != axesVectorCandidatesNum.end(); ++itr )
Expand Down

0 comments on commit f411b5f

Please sign in to comment.