mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Some NPE fixing for server and client.
This commit is contained in:
parent
a2e93986bc
commit
9020a287d6
3 changed files with 35 additions and 18 deletions
|
|
@ -192,7 +192,6 @@ public class TournamentPanel extends javax.swing.JPanel {
|
|||
}
|
||||
|
||||
public void update(TournamentView tournament) {
|
||||
|
||||
if (!firstInitDone) {
|
||||
Component c = this.getParent();
|
||||
while (c != null && !(c instanceof TournamentPane)) {
|
||||
|
|
@ -689,7 +688,7 @@ class UpdateTournamentTask extends SwingWorker<Void, TournamentView> {
|
|||
|
||||
@Override
|
||||
protected void process(List<TournamentView> view) {
|
||||
if (view != null) { // if user disconnects, view can be null for a short time
|
||||
if (view != null && view.size() > 0) { // if user disconnects, view can be null for a short time
|
||||
panel.update(view.get(0));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue