summaryrefslogtreecommitdiff
path: root/src/net/guildhandler.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-04-18 15:23:49 +0000
committerDavid Athay <ko2fan@gmail.com>2008-04-18 15:23:49 +0000
commit4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76 (patch)
tree831d9d2e909dabab0ee2c6ed640e290ee28ad294 /src/net/guildhandler.cpp
parent0b567928c0a24c7346451b59285ce8144ae0bf2e (diff)
downloadmana-client-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.gz
mana-client-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.bz2
mana-client-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.xz
mana-client-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.zip
Fixed numerous crashes with chat and guild windows using new tabbed area.
Diffstat (limited to 'src/net/guildhandler.cpp')
-rw-r--r--src/net/guildhandler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/net/guildhandler.cpp b/src/net/guildhandler.cpp
index c178df18..05fa0953 100644
--- a/src/net/guildhandler.cpp
+++ b/src/net/guildhandler.cpp
@@ -168,8 +168,13 @@ void GuildHandler::handleMessage(MessageIn &msg)
// Must remove tab first, as it wont find the guild
// name after its removed from the player
int guildId = msg.readInt16();
- guildWindow->removeTab(guildId);
- player_node->removeGuild(guildId);
+ Guild *guild = player_node->getGuild(guildId);
+ if (guild)
+ {
+ chatWindow->removeChannel(guild->getName());
+ guildWindow->removeTab(guildId);
+ player_node->removeGuild(guildId);
+ }
}
} break;
}