Convert gmx_mtop_t to C++
[alexxy/gromacs.git] / src / gromacs / topology / block.cpp
index 73c7e47cbbaabb17dec2e52f7ad45eb71081474c..937d065abb7ac3b90b1a8690e2b67c333e5932ac 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -76,8 +76,9 @@ t_blocka *new_blocka(void)
 
 void done_block(t_block *block)
 {
-    block->nr    = 0;
+    block->nr           = 0;
     sfree(block->index);
+    block->index        = nullptr;
     block->nalloc_index = 0;
 }