summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/party.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/party.cpp b/src/party.cpp
index 9a661e5b..438ab0fe 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -29,9 +29,14 @@ PartyMember::PartyMember(int partyId, int id, const std::string &name):
{
mParty = Party::getParty(partyId);
- Player *player = dynamic_cast<Player*>(beingManager->findBeing(id));
- if (player)
- player->setParty(mParty);
+ if (beingManager)
+ {
+ Player *player = dynamic_cast<Player*>(beingManager->findBeing(id));
+ if (player)
+ {
+ player->setParty(mParty);
+ }
+ }
}
PartyMember::PartyMember(int PartyId, int id):