summaryrefslogtreecommitdiffstats
path: root/src/H5mpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5mpi.c')
-rw-r--r--src/H5mpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5mpi.c b/src/H5mpi.c
index 613a4bf..1c2d3b7 100644
--- a/src/H5mpi.c
+++ b/src/H5mpi.c
@@ -210,7 +210,7 @@ H5_mpi_comm_free(MPI_Comm *comm)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "comm pointer cannot be NULL")
/* Free the communicator */
- if (MPI_COMM_NULL != *comm)
+ if (MPI_COMM_WORLD != *comm && MPI_COMM_NULL != *comm)
MPI_Comm_free(comm);
*comm = MPI_COMM_NULL;