Fix gmxdump error introduced by 553d4b1369
authorRoland Schulz <roland@utk.edu>
Mon, 30 Apr 2012 02:20:20 +0000 (22:20 -0400)
committerRoland Schulz <roland@utk.edu>
Mon, 30 Apr 2012 03:17:40 +0000 (23:17 -0400)
Change-Id: Ib3ebe7231e3be0f2bdeda21cf5c589f6d5144c5c

src/kernel/gmxdump.c

index a65debe7c523e0d79d1403b8ff75ca10cb268acf..bd7f04d1cb13543316024bf7f5b27ae2329677cb 100644 (file)
@@ -39,6 +39,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
+#include <assert.h>
 #include "main.h"
 #include "macros.h"
 #include "futil.h"
@@ -290,7 +291,7 @@ void list_ene(const char *fn)
     int        ndr;
     ener_file_t in;
     gmx_bool       bCont;
-    gmx_enxnm_t *enm;
+    gmx_enxnm_t *enm=NULL;
     t_enxframe *fr;
     int        i,j,nre,b;
     real       rav,minthird;
@@ -299,6 +300,7 @@ void list_ene(const char *fn)
     printf("gmxdump: %s\n",fn);
     in = open_enx(fn,"r");
     do_enxnms(in,&nre,&enm);
+    assert(enm);
 
     printf("energy components:\n");
     for(i=0; (i<nre); i++)