must nullify "readers" array, so there is no crash when deleting it later

This commit is contained in:
Axel Kohlmeyer
2020-10-23 04:21:15 -04:00
parent 114f039a68
commit e3ecb6ccc4

View File

@ -231,6 +231,10 @@ void ReadDump::setup_reader(int narg, char **arg)
readers = new Reader*[nreader];
nsnapatoms = new bigint[nreader];
for (int i=0; i < nreader; ++i) {
readers[i] = nullptr;
nsnapatoms[i] = 0;
}
// create Nreader reader classes per reader
// match readerstyle to options in style_reader.h