forked from lijiext/lammps
must bracket 'memory->destroy()' calls in destructor with 'if (allocated)'
This commit is contained in:
parent
1e8ccb1774
commit
8f90d6c6d0
|
@ -42,7 +42,9 @@ PairBuckCoulCut::PairBuckCoulCut(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
|
||||||
PairBuckCoulCut::~PairBuckCoulCut()
|
PairBuckCoulCut::~PairBuckCoulCut()
|
||||||
{
|
{
|
||||||
if (!copymode) {
|
if (copymode) return;
|
||||||
|
|
||||||
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(cutsq);
|
memory->destroy(cutsq);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue