fix crash on trying to free a NULL communicator
This commit is contained in:
@ -220,5 +220,6 @@ void AngleWrite::command(int narg, char **arg)
|
||||
// clean up
|
||||
delete writer;
|
||||
}
|
||||
MPI_Comm_free(&singlecomm);
|
||||
if (singlecomm != MPI_COMM_NULL)
|
||||
MPI_Comm_free(&singlecomm);
|
||||
}
|
||||
|
||||
@ -198,5 +198,6 @@ void DihedralWrite::command(int narg, char **arg)
|
||||
delete writer;
|
||||
fclose(fp);
|
||||
}
|
||||
MPI_Comm_free(&singlecomm);
|
||||
if (singlecomm != MPI_COMM_NULL)
|
||||
MPI_Comm_free(&singlecomm);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user