From: bangerth Date: Fri, 1 Jul 2011 00:14:00 +0000 (+0000) Subject: Only access elements of a vector if it is not empty. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f398de7aaefac12554ee87e5e0c4d2541ee096b4;p=dealii-svn.git Only access elements of a vector if it is not empty. git-svn-id: https://svn.dealii.org/trunk@23896 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/dofs/dof_handler_policy.cc b/deal.II/source/dofs/dof_handler_policy.cc index 8fafef6846..16e916d303 100644 --- a/deal.II/source/dofs/dof_handler_policy.cc +++ b/deal.II/source/dofs/dof_handler_policy.cc @@ -993,7 +993,8 @@ namespace internal // complete all sends, so that we can // safely destroy the buffers. - MPI_Waitall(requests.size(), &requests[0], MPI_STATUSES_IGNORE); + if (requests.size() > 0) + MPI_Waitall(requests.size(), &requests[0], MPI_STATUSES_IGNORE); #ifdef DEBUG