Skip to content

Commit

Permalink
Add the debugging exception
Browse files Browse the repository at this point in the history
  • Loading branch information
shumov-ag committed Jan 25, 2022
1 parent a6eb248 commit 1f35b10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rmw_fastrtps_shared_cpp/src/types/guard_condition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ class GuardCondition
attachCondition(std::mutex * conditionMutex, std::condition_variable * conditionVariable)
{
std::lock_guard<std::mutex> lock(internalMutex_);
if (conditionMutex_ != nullptr) {
throw std::runtime_error("The guard condition had already been attached");
}
conditionMutex_ = conditionMutex;
conditionVariable_ = conditionVariable;
}
Expand Down

0 comments on commit 1f35b10

Please sign in to comment.