Skip to content

Commit

Permalink
fix segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
akohlmey committed May 14, 2024
1 parent c882160 commit 83a4ff0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/REAXFF/fix_reaxff_species.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,14 @@ int FixReaxFFSpecies::setmask()
void FixReaxFFSpecies::setup(int /*vflag*/)
{
ntotal = static_cast<int>(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();
}
Expand Down

0 comments on commit 83a4ff0

Please sign in to comment.