From: Carsten Kutzner Date: Fri, 29 Oct 2010 16:38:33 +0000 (+0200) Subject: Fixed segv in gmx_hbond X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=acc4218885e6f834f04d510049f33ead8105abe0;p=alexxy%2Fgromacs.git Fixed segv in gmx_hbond --- diff --git a/src/tools/gmx_hbond.c b/src/tools/gmx_hbond.c index d4769e5d73..12e16ed21e 100644 --- a/src/tools/gmx_hbond.c +++ b/src/tools/gmx_hbond.c @@ -1649,7 +1649,10 @@ static void do_merge(t_hbdata *hb,int ntmp, srenew(hb0->h[0],4+nnframes/hb->wordlen); srenew(hb0->g[0],4+nnframes/hb->wordlen); } - clearPshift(&(hb->per->pHist[a1][a2])); + if (NULL != hb->per->pHist) + { + clearPshift(&(hb->per->pHist[a1][a2])); + } /* Copy temp array to target array */ for(m=0; (m<=nnframes); m++) { @@ -3847,7 +3850,7 @@ int gmx_hbond(int argc,char *argv[]) trrStatus = (read_next_x(oenv,status,&t,natoms,x,box)); nframes++; /* + */ } /* + */ -#ifdef HAVE_OPENMP /* ++++++++++++++++ยด */ +#ifdef HAVE_OPENMP /* +++++++++++++++++ */ #pragma omp barrier #endif } while (trrStatus);