Merge remote-tracking branch 'origin/release-4-6'
[alexxy/gromacs.git] / src / gromacs / mdlib / coupling.c
index 6217bc0bfa512819682c9566b782106ce31c47e7..09fa4fba054e8f71627833a86d0087e553a72687 100644 (file)
@@ -35,6 +35,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <assert.h>
 
 #include "typedefs.h"
 #include "smalloc.h"
@@ -706,6 +707,7 @@ void trotter_update(t_inputrec *ir,gmx_large_int_t step, gmx_ekindata_t *ekind,
     dtc = ir->nsttcouple*ir->delta_t;
     opts = &(ir->opts); /* just for ease of referencing */
     ngtc = opts->ngtc;
+    assert(ngtc>0);
     snew(scalefac,opts->ngtc);
     for (i=0;i<ngtc;i++) 
     {