diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 9 | ||||
-rw-r--r-- | src/net/network.h | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4aadbb74..9ac4b9a3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1120,9 +1120,12 @@ int main(int argc, char *argv[]) logger->log("Exception"); } - accountServerConnection->disconnect(); - gameServerConnection->disconnect(); - chatServerConnection->disconnect(); + if (accountServerConnection) + accountServerConnection->disconnect(); + if (gameServerConnection) + gameServerConnection->disconnect(); + if (chatServerConnection) + chatServerConnection->disconnect(); delete accountServerConnection; delete gameServerConnection; diff --git a/src/net/network.h b/src/net/network.h index 0701a956..42590adf 100644 --- a/src/net/network.h +++ b/src/net/network.h @@ -50,6 +50,9 @@ namespace Net */ void finalize(); + /** + * Returns a new Connection object. Should be deleted by the caller. + */ Connection *getConnection(); /** |