retval = MPI_ERR_ARG;
} else if (count < 0){
retval = MPI_ERR_COUNT;
+ } else if (sendbuf == nullptr || recvbuf == nullptr){
+ retval = MPI_ERR_BUFFER;
} else {
int rank = simgrid::s4u::this_actor::get_pid();
void* sendtmpbuf = sendbuf;
retval = MPI_ERR_ARG;
} else if (count < 0){
retval = MPI_ERR_COUNT;
+ } else if (sendbuf == nullptr || recvbuf == nullptr){
+ retval = MPI_ERR_BUFFER;
} else {
int rank = simgrid::s4u::this_actor::get_pid();
void* sendtmpbuf = sendbuf;