summaryrefslogtreecommitdiff
path: root/src/guild.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guild.cpp')
-rw-r--r--src/guild.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/guild.cpp b/src/guild.cpp
index 65515cd7..d6ef80cf 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -170,11 +170,10 @@ void Guild::removeFromMembers()
itr_end = mMembers.end();
while(itr != itr_end)
{
- Player *p = dynamic_cast<Player*>(beingManager->findBeing((*itr)->getID()));
- if (p)
- {
- p->removeGuild(getId());
- }
+ Being *b = beingManager->findBeing((*itr)->getID());
+
+ if (b->getType() == Being::PLAYER)
+ static_cast<Player*>(b)->removeGuild(getId());
++itr;
}
}