diff options
author | Dennis Friis <peavey@placid.dk> | 2008-06-09 15:03:14 +0000 |
---|---|---|
committer | Dennis Friis <peavey@placid.dk> | 2008-06-09 15:03:14 +0000 |
commit | eb019ab915998a3ec247b33dad4b23f763d7a29a (patch) | |
tree | 54c4844a719942376327dac8678476524c54db6c /src/player_relations.cpp | |
parent | 0dd4c03506132c5f4a7104152d8675d6990ba81b (diff) | |
download | mana-eb019ab915998a3ec247b33dad4b23f763d7a29a.tar.gz mana-eb019ab915998a3ec247b33dad4b23f763d7a29a.tar.bz2 mana-eb019ab915998a3ec247b33dad4b23f763d7a29a.tar.xz mana-eb019ab915998a3ec247b33dad4b23f763d7a29a.zip |
Fix for segfault in drop down list of player ignore and sanity check for /whisper ignore. Patch by fate.
Diffstat (limited to 'src/player_relations.cpp')
-rw-r--r-- | src/player_relations.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/player_relations.cpp b/src/player_relations.cpp index 86e0861e..f7e04712 100644 --- a/src/player_relations.cpp +++ b/src/player_relations.cpp @@ -211,9 +211,13 @@ PlayerRelationsManager::hasPermission(const std::string &name, unsigned int flag if (!permitted) { // execute `ignore' strategy, if possible - if (mIgnoreStrategy) - mIgnoreStrategy->ignore(dynamic_cast<Player *>(beingManager->findBeingByName(name, Being::PLAYER)), - rejections); + if (mIgnoreStrategy) { + Player *to_ignore = dynamic_cast<Player *>(beingManager->findBeingByName(name, Being::PLAYER)); + + if (to_ignore) + mIgnoreStrategy->ignore(to_ignore, + rejections); + } } return permitted; |