must not try to delete computes if they have not been created and their ids not yet set
This commit is contained in:
@ -41,14 +41,17 @@ ResetMolIDs::ResetMolIDs(LAMMPS *lmp) : Pointers(lmp) {
|
||||
compressflag = 1;
|
||||
singleflag = 0;
|
||||
offset = -1;
|
||||
|
||||
idfrag.clear();
|
||||
idchunk.clear();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ResetMolIDs::~ResetMolIDs()
|
||||
{
|
||||
modify->delete_compute(idfrag);
|
||||
if (compressflag) modify->delete_compute(idchunk);
|
||||
if (!idfrag.empty()) modify->delete_compute(idfrag);
|
||||
if (compressflag && !idchunk.empty()) modify->delete_compute(idchunk);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user