From 4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76 Mon Sep 17 00:00:00 2001 From: David Athay Date: Fri, 18 Apr 2008 15:23:49 +0000 Subject: Fixed numerous crashes with chat and guild windows using new tabbed area. --- src/net/guildhandler.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/net/guildhandler.cpp') 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; } -- cgit v1.2.3-70-g09d2