forked from lijiext/lammps
Bug fix to prevent segfault when deallocate_groups is called even though groups have not been allocated.
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8411 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
f6de5943ed
commit
3d3dd0d50b
|
@ -44,6 +44,7 @@ Ewald::Ewald(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg)
|
|||
if (narg != 1) error->all(FLERR,"Illegal kspace_style ewald command");
|
||||
|
||||
group_group_enable = 1;
|
||||
group_allocate_flag = 0;
|
||||
|
||||
accuracy_relative = atof(arg[0]);
|
||||
|
||||
|
@ -67,7 +68,7 @@ Ewald::Ewald(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg)
|
|||
Ewald::~Ewald()
|
||||
{
|
||||
deallocate();
|
||||
deallocate_groups();
|
||||
if (group_allocate_flag) deallocate_groups();
|
||||
memory->destroy(ek);
|
||||
memory->destroy3d_offset(cs,-kmax_created);
|
||||
memory->destroy3d_offset(sn,-kmax_created);
|
||||
|
|
Loading…
Reference in New Issue