xbt_dynar_foreach(q, iter, comm) {
empty = 1;
if (MSG_comm_test(comm)) {
- MSG_comm_destroy(comm);
status = MSG_comm_get_status(comm);
+ MSG_comm_destroy(comm);
xbt_assert(status == MSG_OK, "process_pending_connections() failed");
xbt_dynar_cursor_rm(q, &iter);
empty = 0;