NULL data containers should make functions fail early
If passing a NULL vector to e.g. tng_util_pos_write() it might create data blocks etc. before complaining that there is no data.
#1 Updated by Magnus Lundborg almost 7 years ago
- Status changed from Accepted to Closed
This should be OK now. But the functions still return TNG_FAILURE if trying to write a NULL vector - since something probably went wrong. This means that it still makes sense to check the pointer before calling the function or other failures might not be caught. Another alternative would be to ignore failures when writing from GROMACS and just fail when receiving TNG_CRITICAL. However, closing this.