summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/charserverhandler.cpp5
-rw-r--r--src/net/ea/charserverhandler.h2
-rw-r--r--src/net/ea/chathandler.cpp5
-rw-r--r--src/net/ea/chathandler.h2
-rw-r--r--src/net/ea/partyhandler.cpp1
5 files changed, 15 insertions, 0 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index d0703e501..ae8da9e4a 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -41,6 +41,11 @@ CharServerHandler::CharServerHandler() :
{
}
+CharServerHandler::~CharServerHandler()
+{
+ clear();
+}
+
void CharServerHandler::setCharSelectDialog(CharSelectDialog *const window)
const
{
diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h
index bd7d1cce2..1faa59403 100644
--- a/src/net/ea/charserverhandler.h
+++ b/src/net/ea/charserverhandler.h
@@ -36,6 +36,8 @@ class CharServerHandler notfinal : public Net::CharServerHandler
public:
A_DELETE_COPY(CharServerHandler)
+ ~CharServerHandler();
+
void setCharSelectDialog(CharSelectDialog *const window) const
override final;
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index c9f18ad86..8937852c6 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -41,6 +41,11 @@ ChatHandler::ChatHandler()
ChatRecv::mSkipping = true;
}
+ChatHandler::~ChatHandler()
+{
+ clear();
+}
+
void ChatHandler::clear() const
{
ChatRecv::mShowMotd = config.getBoolValue("showmotd");
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index 43b4de88b..b19105193 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -39,6 +39,8 @@ class ChatHandler notfinal : public Net::ChatHandler
A_DELETE_COPY(ChatHandler)
+ ~ChatHandler();
+
void me(const std::string &restrict text,
const std::string &restrict channel) const override final;
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 531b4bdba..23f7347b9 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -45,6 +45,7 @@ PartyHandler::PartyHandler() :
PartyHandler::~PartyHandler()
{
delete2(partyTab);
+ taParty = nullptr;
}
void PartyHandler::join(const int partyId A_UNUSED) const