diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-04-07 18:46:10 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-04-07 18:46:10 +0300 |
commit | 7281c68b271092feeac6f3d56946dbb01d1179e5 (patch) | |
tree | 5448f6b29b9a26d83f4a0aff292623a8042ac8cb /src | |
parent | d228f1b658cb2d0302ffafb0e726b4b4b5b63aa2 (diff) | |
download | minetest-7281c68b271092feeac6f3d56946dbb01d1179e5.tar.gz minetest-7281c68b271092feeac6f3d56946dbb01d1179e5.tar.bz2 minetest-7281c68b271092feeac6f3d56946dbb01d1179e5.zip |
Fix segfault when setting privileges of a non-connected player
Diffstat (limited to 'src')
-rw-r--r-- | src/server.cpp | 5 |
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()); } |