summaryrefslogtreecommitdiff
path: root/src/player_relations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/player_relations.cpp')
-rw-r--r--src/player_relations.cpp10
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;