mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Fixed possible npe in debug info generation.
This commit is contained in:
parent
a42a03355e
commit
da44199b3d
2 changed files with 12 additions and 12 deletions
|
|
@ -207,7 +207,7 @@ public class TableManager {
|
|||
}
|
||||
|
||||
public boolean removeTable(UUID userId, UUID tableId) {
|
||||
if (UserManager.getInstance().isAdmin(userId)) {
|
||||
if (isTableOwner(tableId, userId) || UserManager.getInstance().isAdmin(userId)) {
|
||||
logger.debug("Table remove request - userId: " + userId + " tableId: " + tableId);
|
||||
TableController tableController = controllers.get(tableId);
|
||||
if (tableController != null) {
|
||||
|
|
@ -386,7 +386,7 @@ public class TableManager {
|
|||
try {
|
||||
if (!table.getState().equals(TableState.FINISHED)) {
|
||||
// remove tables and games not valid anymore
|
||||
logger.debug(table.getId() + " [" + table.getName()+ "] " + formatter.format(table.getStartTime()) +" (" + table.getState().toString() + ") " + (table.isTournament() ? "- Tournament":""));
|
||||
logger.debug(table.getId() + " [" + table.getName()+ "] " + formatter.format(table.getStartTime() == null ? table.getCreateTime() : table.getCreateTime()) +" (" + table.getState().toString() + ") " + (table.isTournament() ? "- Tournament":""));
|
||||
TableController tableController = getController(table.getId());
|
||||
if (tableController != null) {
|
||||
if (table.isTournament()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue