Fix segfault when setting privileges of a non-connected player
parent
d228f1b658
commit
7281c68b27
|
@ -4322,7 +4322,10 @@ void Server::reportPrivsModified(const std::string &name)
|
||||||
if(!player)
|
if(!player)
|
||||||
return;
|
return;
|
||||||
SendPlayerPrivileges(player->peer_id);
|
SendPlayerPrivileges(player->peer_id);
|
||||||
player->getPlayerSAO()->updatePrivileges(
|
PlayerSAO *sao = player->getPlayerSAO();
|
||||||
|
if(!sao)
|
||||||
|
return;
|
||||||
|
sao->updatePrivileges(
|
||||||
getPlayerEffectivePrivs(name),
|
getPlayerEffectivePrivs(name),
|
||||||
isSingleplayer());
|
isSingleplayer());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue