diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-02-08 19:04:45 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-02-08 19:05:17 -0700 |
commit | f3ee70f4aa0b4df7388a4539440355bb066dc0d3 (patch) | |
tree | b8914788dfec80c46301f8b5e4d0358162157f64 /src/party.cpp | |
parent | aa0325fac0f16ced4ac710b5126da5bc5c2af441 (diff) | |
download | mana-f3ee70f4aa0b4df7388a4539440355bb066dc0d3.tar.gz mana-f3ee70f4aa0b4df7388a4539440355bb066dc0d3.tar.bz2 mana-f3ee70f4aa0b4df7388a4539440355bb066dc0d3.tar.xz mana-f3ee70f4aa0b4df7388a4539440355bb066dc0d3.zip |
Fix crash when populating parties without BeingManager
Diffstat (limited to 'src/party.cpp')
-rw-r--r-- | src/party.cpp | 11 |
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): |