forked from External/mage
fixed several NPEs on server
This commit is contained in:
parent
621e0fb4b1
commit
ca6e1556f0
5 changed files with 16 additions and 7 deletions
|
|
@ -451,8 +451,11 @@ public class MageServerImpl implements MageServer {
|
|||
@Override
|
||||
public boolean isTableOwner(String sessionId, UUID roomId, UUID tableId) throws MageException {
|
||||
try {
|
||||
UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
|
||||
return TableManager.getInstance().isTableOwner(tableId, userId);
|
||||
Session session = SessionManager.getInstance().getSession(sessionId);
|
||||
if (session != null) {
|
||||
UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
|
||||
return TableManager.getInstance().isTableOwner(tableId, userId);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
handleException(ex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue