protect a couple more fixes from segfaults from errors in derived classes

This commit is contained in:
Axel Kohlmeyer
2023-06-17 18:52:57 -04:00
parent 5eba9d7ee3
commit e2e9170dfa
2 changed files with 2 additions and 2 deletions

View File

@ -610,7 +610,7 @@ FixRigid::~FixRigid()
{
// unregister callbacks to this fix from Atom class
atom->delete_callback(id,Atom::GROW);
if (modify->get_fix_by_id(id)) atom->delete_callback(id,Atom::GROW);
delete random;
delete[] inpfile;

View File

@ -203,7 +203,7 @@ FixLangevin::~FixLangevin()
if (gjfflag) {
memory->destroy(franprev);
memory->destroy(lv);
atom->delete_callback(id, Atom::GROW);
if (modify->get_fix_by_id(id)) atom->delete_callback(id, Atom::GROW);
}
}