mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Fixed a possible null pointer exception.
This commit is contained in:
parent
e49c92e80c
commit
ca39289a3a
1 changed files with 6 additions and 2 deletions
|
@ -558,8 +558,12 @@ public class MageServerImpl implements MageServer {
|
|||
execute("leaveChat", sessionId, new Action() {
|
||||
@Override
|
||||
public void execute() {
|
||||
UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
|
||||
ChatManager.getInstance().leaveChat(chatId, userId);
|
||||
if (chatId != null) {
|
||||
UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
|
||||
ChatManager.getInstance().leaveChat(chatId, userId);
|
||||
} else {
|
||||
logger.warn("The chatId is null. sessionId = " + sessionId);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue