1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 23:58:48 -05:00

Fix segfault when setting privileges of a non-connected player

This commit is contained in:
Perttu Ahola 2012-04-07 18:46:10 +03:00
parent d228f1b658
commit 7281c68b27

View File

@ -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());
}