summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/serverdialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 2b6f1dea..dd34a24e 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -262,8 +262,8 @@ void ServerDialog::action(const gcn::ActionEvent &event)
mServerInfo->type = ServerInfo::UNKNOWN;
}
- // Save when it is not one of the selected servers
- mServerInfo->save = (mServersList->getSelected() == -1);
+ // Save the selected server
+ mServerInfo->save = true;
saveCustomServers(*mServerInfo);
@@ -532,7 +532,7 @@ void ServerDialog::saveCustomServers(const ServerInfo &currentServer)
const ServerInfo &server = mServers.at(i);
// Only save servers that were loaded from settings
- if (!server.save)
+ if (!(server.save && server.isValid()))
continue;
const std::string index = toString(savedServerCount);