Unverified Commit 8f90d6c6 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

must bracket 'memory->destroy()' calls in destructor with 'if (allocated)'

parent 1e8ccb17
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);