diff options
author | Alexander Neben <alexander.neben@mongodb.com> | 2022-07-21 15:22:49 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-21 15:54:31 +0000 |
commit | a9670e15843c06b3bacdc661bd3666d402df09df (patch) | |
tree | 0e2d9801bffbafb88ab63a177f05e719297568b1 /src | |
parent | f2fdac7de514b76a1e951bb7c9c12924fe50ac46 (diff) | |
download | mongo-a9670e15843c06b3bacdc661bd3666d402df09df.tar.gz |
SERVER-67133 Debug mode fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/base/dependency_graph.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/base/dependency_graph.cpp b/src/mongo/base/dependency_graph.cpp index 8d9107b5a10..612fcbc7d3d 100644 --- a/src/mongo/base/dependency_graph.cpp +++ b/src/mongo/base/dependency_graph.cpp @@ -105,6 +105,9 @@ std::vector<std::string> DependencyGraph::topSort(std::vector<std::string>* cycl // Swap the pointers in the `elements` vector that point to `a` and `b`. // Update their 'membership' data members to reflect the change. auto swapPositions = [](Element& a, Element& b) { + if (&a == &b) { + return; + } using std::swap; swap(*a.membership, *b.membership); swap(a.membership, b.membership); |