diff options
author | David Athay <ko2fan@gmail.com> | 2008-04-18 15:23:49 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-04-18 15:23:49 +0000 |
commit | 4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76 (patch) | |
tree | 831d9d2e909dabab0ee2c6ed640e290ee28ad294 /src/net/guildhandler.cpp | |
parent | 0b567928c0a24c7346451b59285ce8144ae0bf2e (diff) | |
download | mana-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.gz mana-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.bz2 mana-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.xz mana-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.cpp | 9 |
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; } |