Skip to content

Commit

Permalink
Merge pull request #1059 from jamierobertson1/master
Browse files Browse the repository at this point in the history
Update UpdateOperations::Remove to prevent Visual Studio crash in debug mode
  • Loading branch information
robertosfield authored Jan 1, 2024
2 parents 486afff + 801a310 commit 0257fdd
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/vsg/app/UpdateOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,8 @@ void UpdateOperations::add(ref_ptr<Operation> op, RunBehavior runBehavior)
void UpdateOperations::remove(ref_ptr<Operation> op)
{
std::scoped_lock<std::mutex> lock(_updateOperationMutex);
for (auto itr = _updateOperationsOneTime.begin(); itr != _updateOperationsOneTime.end(); ++itr)
{
if (*itr == op) itr = _updateOperationsOneTime.erase(itr);
}
for (auto itr = _updateOperationsAllFrames.begin(); itr != _updateOperationsAllFrames.end(); ++itr)
{
if (*itr == op) itr = _updateOperationsAllFrames.erase(itr);
}
_updateOperationsOneTime.remove(op);
_updateOperationsAllFrames.remove(op);
}

void UpdateOperations::clear()
Expand Down

0 comments on commit 0257fdd

Please sign in to comment.