summaryrefslogtreecommitdiff
path: root/src/guild.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-02 05:11:50 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-02 05:11:50 +0300
commitf498d80c587033bffb9abedb2b0827ad8d4a2a32 (patch)
tree82da8928768b2159c199c2d033388a071f228582 /src/guild.cpp
parent1ba44aeb62414ea349e462b6d4fccbaac00be115 (diff)
downloadplus-f498d80c587033bffb9abedb2b0827ad8d4a2a32.tar.gz
plus-f498d80c587033bffb9abedb2b0827ad8d4a2a32.tar.bz2
plus-f498d80c587033bffb9abedb2b0827ad8d4a2a32.tar.xz
plus-f498d80c587033bffb9abedb2b0827ad8d4a2a32.zip
Add some checks after automatic checking.
Diffstat (limited to 'src/guild.cpp')
-rw-r--r--src/guild.cpp7
1 files changed, 6 insertions, 1 deletions
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;