From 83a4ff06bd0e3af56dce6451e5977c4847c25120 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 14 May 2024 08:14:38 -0400 Subject: [PATCH] fix segfault --- src/REAXFF/fix_reaxff_species.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/REAXFF/fix_reaxff_species.cpp b/src/REAXFF/fix_reaxff_species.cpp index 2c0775b9d9b..0183d2670b9 100644 --- a/src/REAXFF/fix_reaxff_species.cpp +++ b/src/REAXFF/fix_reaxff_species.cpp @@ -346,13 +346,14 @@ int FixReaxFFSpecies::setmask() void FixReaxFFSpecies::setup(int /*vflag*/) { ntotal = static_cast(atom->natoms); - if (Name == nullptr) memory->create(Name, nutypes, "reaxff/species:Name"); if (!eleflag) { for (int i = 0; i < ntypes; i++) eletype[i] = reaxff->eletype[i+1]; GetUniqueElements(); } + memory->destroy(Name); + memory->create(Name, nutypes, "reaxff/species:Name"); post_integrate(); }