From dbf51af7d1565c62902eef22a7aa6f6eb552432b Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 26 Aug 2020 18:41:32 -0400 Subject: [PATCH] Fixes segfault due to uninitialized pointers --- src/KSPACE/pair_buck_coul_long.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index a46424baf7..a63047ea9f 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -43,7 +43,17 @@ PairBuckCoulLong::PairBuckCoulLong(LAMMPS *lmp) : Pair(lmp) { ewaldflag = pppmflag = 1; writedata = 1; - ftable = NULL; + ftable = nullptr; + cut_lj = nullptr; + cut_ljsq = nullptr; + a = nullptr; + rho = nullptr; + c = nullptr; + rhoinv = nullptr; + buck1 = nullptr; + buck2 = nullptr; + offset = nullptr; + cut_respa = nullptr; } /* ---------------------------------------------------------------------- */