diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index 7eecb62121..f9e7c94920 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -42,7 +42,9 @@ PairBuckCoulCut::PairBuckCoulCut(LAMMPS *lmp) : Pair(lmp) PairBuckCoulCut::~PairBuckCoulCut() { - if (!copymode) { + if (copymode) return; + + if (allocated) { memory->destroy(setflag); memory->destroy(cutsq);