diff --git a/cxx/src/lib/io/fileio.cc b/cxx/src/lib/io/fileio.cc index abcfd8034..f6a43a84d 100644 --- a/cxx/src/lib/io/fileio.cc +++ b/cxx/src/lib/io/fileio.cc @@ -89,6 +89,9 @@ std::vector fwrite_to_file(mspass::seismic::LoggingEnsemble foffs; + /* This will return an empty vector if the ensemble is marked dead - callers should handle this condition + but they normally shouldn't be calling this function if the entire ensemble is marked dead anyway.*/ + if(d.dead()) return(foffs); string fname; if(dir.length()>0) /* for expected context for use in python we will assume dir does not @@ -101,6 +104,8 @@ std::vector fwrite_to_file(mspass::seismic::LoggingEnsemble fwrite_to_file(mspass::seismic::LoggingEnsemble foffs; + if(d.dead()) return(foffs); string fname; if(dir.length()>0) /* for expected context for use in python we will assume dir does not @@ -138,6 +144,8 @@ std::vector fwrite_to_file(mspass::seismic::LoggingEnsemble