summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/server_manager.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-02-27 01:28:49 +0100
committerLiam <byteslice@airmail.cc>2024-02-27 01:28:49 +0100
commitc7174d5f612a57b6dd55dc51306b1852f5f8b786 (patch)
tree438a7f03abceb3d21646f57c9fb89428390e977b /src/core/hle/service/server_manager.cpp
parentMerge pull request #13172 from liamwhite/gl-streams (diff)
downloadyuzu-c7174d5f612a57b6dd55dc51306b1852f5f8b786.tar
yuzu-c7174d5f612a57b6dd55dc51306b1852f5f8b786.tar.gz
yuzu-c7174d5f612a57b6dd55dc51306b1852f5f8b786.tar.bz2
yuzu-c7174d5f612a57b6dd55dc51306b1852f5f8b786.tar.lz
yuzu-c7174d5f612a57b6dd55dc51306b1852f5f8b786.tar.xz
yuzu-c7174d5f612a57b6dd55dc51306b1852f5f8b786.tar.zst
yuzu-c7174d5f612a57b6dd55dc51306b1852f5f8b786.zip
Diffstat (limited to 'src/core/hle/service/server_manager.cpp')
-rw-r--r--src/core/hle/service/server_manager.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/hle/service/server_manager.cpp b/src/core/hle/service/server_manager.cpp
index 0b41bbcb9..3d898725e 100644
--- a/src/core/hle/service/server_manager.cpp
+++ b/src/core/hle/service/server_manager.cpp
@@ -93,13 +93,19 @@ ServerManager::~ServerManager() {
m_threads.clear();
// Clean up ports.
- for (auto it = m_servers.begin(); it != m_servers.end(); it = m_servers.erase(it)) {
- delete std::addressof(*it);
+ auto port_it = m_servers.begin();
+ while (port_it != m_servers.end()) {
+ auto* const port = std::addressof(*port_it);
+ port_it = m_servers.erase(port_it);
+ delete port;
}
// Clean up sessions.
- for (auto it = m_sessions.begin(); it != m_sessions.end(); it = m_sessions.erase(it)) {
- delete std::addressof(*it);
+ auto session_it = m_sessions.begin();
+ while (session_it != m_sessions.end()) {
+ auto* const session = std::addressof(*session_it);
+ session_it = m_sessions.erase(session_it);
+ delete session;
}
// Close wakeup event.