summaryrefslogtreecommitdiff
path: root/src/party.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/party.cpp')
-rw-r--r--src/party.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/party.cpp b/src/party.cpp
index e01aab50..b47c194a 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -172,11 +172,9 @@ void Party::removeFromMembers()
itr_end = mMembers.end();
while(itr != itr_end)
{
- Player *p = dynamic_cast<Player*>(beingManager->findBeing((*itr)->getID()));
- if (p)
- {
- p->setParty(NULL);
- }
+ Being *b = beingManager->findBeing((*itr)->getID());
+ if (b->getType() == Being::PLAYER)
+ static_cast<Player*>(b)->setParty(NULL);
++itr;
}
}