raweat.hpp: get_unit(): check existence of marker

This commit is contained in:
Mario Fink
2020-07-28 17:25:41 +02:00
parent 31e2d7a82e
commit ebda13e738
2 changed files with 9 additions and 2 deletions

View File

@@ -511,7 +511,14 @@ public:
{
// assert ( segments_.size() > 0 );
return valid_ ? segments_["punit marker"][7] : std::string("None");
if ( datasec_["punit"].size() > 0 )
{
return valid_ ? segments_["punit marker"][7] : std::string("None");
}
else
{
return std::string("None");
}
}
// get time offset