mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
fixed possible NPEs
This commit is contained in:
parent
c0f837c2e0
commit
a327668660
7 changed files with 57 additions and 43 deletions
|
|
@ -250,12 +250,13 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
}
|
||||
|
||||
public void showTables(UUID roomId) {
|
||||
|
||||
this.roomId = roomId;
|
||||
session = MageFrame.getSession();
|
||||
UUID chatRoomId = null;
|
||||
if (session != null) {
|
||||
btnQuickStart.setVisible(session.isTestMode());
|
||||
gameChooser.init(session);
|
||||
chatRoomId = session.getRoomChatId(roomId);
|
||||
}
|
||||
if (newTableDialog == null) {
|
||||
newTableDialog = new NewTableDialog();
|
||||
|
|
@ -269,14 +270,12 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
joinTableDialog = new JoinTableDialog();
|
||||
MageFrame.getDesktop().add(joinTableDialog, JLayeredPane.MODAL_LAYER);
|
||||
}
|
||||
UUID chatRoomId = session.getRoomChatId(roomId);
|
||||
if (chatRoomId != null) {
|
||||
this.chatPanel.connect(chatRoomId);
|
||||
startTasks();
|
||||
this.setVisible(true);
|
||||
this.repaint();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
hideTables();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue