Skip to content

Commit 7ecc681

Browse files
authored
fix: disconnecting all nodes in manager (#605)
* fix: disconnecting all nodes in manager
1 parent f7cf732 commit 7ecc681

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/react-native-audio-api/common/cpp/audioapi/core/utils/AudioNodeManager.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ void AudioNodeManager::settlePendingConnections() {
7272
assert(to != nullptr);
7373
from->disconnectNode(to);
7474
} else {
75-
for (auto &node : from->outputNodes_) {
76-
from->disconnectNode(node);
75+
for (auto it = from->outputNodes_.begin(); it != from->outputNodes_.end();) {
76+
auto next = std::next(it);
77+
from->disconnectNode(*it);
78+
it = next;
7779
}
7880
}
7981
}

0 commit comments

Comments
 (0)