Skip to content

Commit

Permalink
Fix: ParallelContext::pop()
Browse files Browse the repository at this point in the history
Can be empty in the same situation as the prior commit.
  • Loading branch information
ax3l committed Jan 29, 2024
1 parent 4d892ce commit 3e516af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Src/Base/AMReX_ParallelContext.H
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ inline void set_last_frame_ofs (const std::string & filename) {
frames.back().set_ofs_name(filename);
}
//! Note that it's the user's responsibility to free the MPI_Comm
inline void pop () { frames.pop_back(); }
inline void pop () {
if (frames.size() > 0u) {
frames.pop_back();
}
}

}

Expand Down

0 comments on commit 3e516af

Please sign in to comment.