projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d228f1b
)
Fix segfault when setting privileges of a non-connected player
author
Perttu Ahola
<celeron55@gmail.com>
Sat, 7 Apr 2012 15:46:10 +0000
(18:46 +0300)
committer
Perttu Ahola
<celeron55@gmail.com>
Sat, 7 Apr 2012 15:46:10 +0000
(18:46 +0300)
src/server.cpp
patch
|
blob
|
history
diff --git
a/src/server.cpp
b/src/server.cpp
index b33e2477e78f5d692b6a1eaf15148889a04acc86..d7b55a46829b99e60eaafcc937b08514920541e3 100644
(file)
--- 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());
}