forked from lijiext/lammps
Fixed a segfault introduced by memory-leak fix
This commit is contained in:
parent
7faa48b4c3
commit
c142288eb3
|
@ -113,7 +113,8 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
|
|||
} else error->all(FLERR,"Illegal compute snad/atom command");
|
||||
}
|
||||
|
||||
snaptr = new SNA*[comm->nthreads];
|
||||
nthreads = comm->nthreads;
|
||||
snaptr = new SNA*[nthreads];
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(lmp,rfac0,twojmax,rmin0,switchflag,bzeroflag)
|
||||
#endif
|
||||
|
|
|
@ -109,7 +109,8 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
|
|||
} else error->all(FLERR,"Illegal compute snav/atom command");
|
||||
}
|
||||
|
||||
snaptr = new SNA*[comm->nthreads];
|
||||
nthreads = comm->nthreads;
|
||||
snaptr = new SNA*[nthreads];
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(lmp,rfac0,twojmax,rmin0,switchflag,bzeroflag)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue