protect a couple more fixes from segfaults from errors in derived classes
This commit is contained in:
@ -610,7 +610,7 @@ FixRigid::~FixRigid()
|
|||||||
{
|
{
|
||||||
// unregister callbacks to this fix from Atom class
|
// 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 random;
|
||||||
delete[] inpfile;
|
delete[] inpfile;
|
||||||
|
|||||||
@ -203,7 +203,7 @@ FixLangevin::~FixLangevin()
|
|||||||
if (gjfflag) {
|
if (gjfflag) {
|
||||||
memory->destroy(franprev);
|
memory->destroy(franprev);
|
||||||
memory->destroy(lv);
|
memory->destroy(lv);
|
||||||
atom->delete_callback(id, Atom::GROW);
|
if (modify->get_fix_by_id(id)) atom->delete_callback(id, Atom::GROW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user