mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Fix segfault when setting privileges of a non-connected player
This commit is contained in:
parent
d228f1b658
commit
7281c68b27
1 changed files with 4 additions and 1 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue