[fix] fix crash when transmission id does not exist

This commit is contained in:
dijunkun
2025-08-19 16:33:29 +08:00
parent c7166975b3
commit 6f8fd6a030
5 changed files with 13 additions and 46 deletions

View File

@@ -29,8 +29,13 @@ int Render::MainWindow() {
RecentConnectionsWindow();
StatusBar();
for (auto& it : client_properties_) {
ConnectionStatusWindow(it.second);
for (auto it = client_properties_.begin(); it != client_properties_.end();) {
auto& props = it->second;
if (ConnectionStatusWindow(props)) {
it = client_properties_.erase(it);
} else {
++it;
}
}
return 0;