From f498d80c587033bffb9abedb2b0827ad8d4a2a32 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Feb 2012 05:11:50 +0300 Subject: Add some checks after automatic checking. --- src/guild.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/guild.cpp') diff --git a/src/guild.cpp b/src/guild.cpp index e569bed65..238155d32 100644 --- a/src/guild.cpp +++ b/src/guild.cpp @@ -166,6 +166,8 @@ void Guild::removeMember(GuildMember *member) itr_end = mMembers.end(); while (itr != itr_end) { + if (!*itr) + continue; if ((*itr)->mId == member->mId && (*itr)->mCharId == member->mCharId && (*itr)->getName() == member->getName()) @@ -175,7 +177,7 @@ void Guild::removeMember(GuildMember *member) delete m; return; } - ++itr; + ++ itr; } } @@ -255,6 +257,9 @@ void Guild::setRights(short rights) bool Guild::isMember(GuildMember *member) const { + if (!member) + return false; + if (member->mGuild && member->mGuild != this) return false; -- cgit v1.2.3-70-g09d2