summaryrefslogtreecommitdiff
path: root/src/guild.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-05 15:00:58 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-05 15:00:58 +0300
commit9a3a196dbf633a699c26d0227802a42f025c8bfd (patch)
treedfbdb2ff1e2c54d75a2bf6411d3f70df22518c28 /src/guild.cpp
parentfc17ff22d9df50df9c5d1cf3dc0de358001271ed (diff)
parentece36a40d4e9a838cde01075d7681b8fc517b19f (diff)
downloadplus-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.gz
plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.bz2
plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.xz
plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.zip
Merge branch 'master' into stripped
Conflicts: src/guichan/gui.cpp src/guichan/include/guichan/sdl/sdlpixel.hpp
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;