fix segfault bug for in fix rigid/small found by regression testing

This commit is contained in:
Axel Kohlmeyer 2017-10-20 16:56:06 -04:00
parent aaf5e87c84
commit 0a02c3c78c
1 changed files with 1 additions and 0 deletions

View File

@ -114,6 +114,7 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) :
if (strcmp(arg[3],"molecule") == 0) { if (strcmp(arg[3],"molecule") == 0) {
if (atom->molecule_flag == 0) if (atom->molecule_flag == 0)
error->all(FLERR,"Fix rigid/small requires atom attribute molecule"); error->all(FLERR,"Fix rigid/small requires atom attribute molecule");
bodyid = atom->molecule;
} else if (strcmp(arg[3],"custom") == 0) { } else if (strcmp(arg[3],"custom") == 0) {
if (narg < 5) error->all(FLERR,"Illegal fix rigid/small command"); if (narg < 5) error->all(FLERR,"Illegal fix rigid/small command");