aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp
index b33e2477e..d7b55a468 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -4322,7 +4322,10 @@ void Server::reportPrivsModified(const std::string &name)
if(!player)
return;
SendPlayerPrivileges(player->peer_id);
- player->getPlayerSAO()->updatePrivileges(
+ PlayerSAO *sao = player->getPlayerSAO();
+ if(!sao)
+ return;
+ sao->updatePrivileges(
getPlayerEffectivePrivs(name),
isSingleplayer());
}