From f411b5fabec0e388dee834bed039e8e217f8c935 Mon Sep 17 00:00:00 2001 From: Jon Jenssen Date: Tue, 12 Mar 2024 12:31:48 +0100 Subject: [PATCH] Do not crash if no valid points are found when importing a surface .dat file due to i.e. incorrect file format (comma separated, not space separated) --- ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp b/ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp index 5ad12dd943..548ba9671a 100644 --- a/ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp +++ b/ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp @@ -465,6 +465,8 @@ std::pair, std::vector> RifSurfaceImporter::re } } + if ( surfacePoints.size() == 0 ) return { {}, {} }; + // Determine axes vectors std::vector> pairs; for ( auto itr = axesVectorCandidatesNum.begin(); itr != axesVectorCandidatesNum.end(); ++itr )