summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp3
-rw-r--r--src/guildmanager.cpp11
-rw-r--r--src/guildmanager.h2
3 files changed, 16 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index c933378e6..6a3a63bb6 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -299,6 +299,9 @@ static void destroyGuiWindows()
if (whoIsOnline)
whoIsOnline->setAllowUpdate(false);
+ if (guildManager)
+ guildManager->clear();
+
del_0(windowMenu);
del_0(localChatTab) // Need to do this first, so it can remove itself
del_0(debugChatTab)
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp
index bc4158a12..c929e8598 100644
--- a/src/guildmanager.cpp
+++ b/src/guildmanager.cpp
@@ -50,6 +50,7 @@ GuildManager::GuildManager() :
GuildManager::~GuildManager()
{
+ delete mTab;
mTab = 0;
}
@@ -360,3 +361,13 @@ void GuildManager::notice(std::string msg)
else
send("!setmotd " + msg);
}
+
+void GuildManager::clear()
+{
+ if (socialWindow)
+ {
+ Guild *guild = Guild::getGuild(1);
+ if (guild)
+ socialWindow->removeTab(guild);
+ }
+} \ No newline at end of file
diff --git a/src/guildmanager.h b/src/guildmanager.h
index a46cba915..88e1276eb 100644
--- a/src/guildmanager.h
+++ b/src/guildmanager.h
@@ -66,6 +66,8 @@ class GuildManager
Guild *createGuild();
+ void clear();
+
bool havePower()
{ return mHavePower; }