prevent segfault when defining pair_style comb3 without arguments

This commit is contained in:
Axel Kohlmeyer
2017-05-26 10:52:20 -04:00
parent 53e7fee5b7
commit 5b1e582f03

View File

@ -161,6 +161,8 @@ void PairComb3::allocate()
void PairComb3::settings(int narg, char **arg)
{
if (narg != 1) error->all(FLERR,"Illegal pair_style command");
if (strcmp(arg[0],"polar_on") == 0) {
pol_flag = 1;
if (comm->me == 0 && screen) fprintf(screen,