Added synchronization in client session - fixes NPE on exit.

This commit is contained in:
magenoxx 2011-06-15 23:11:05 +04:00
parent 44b48a3722
commit bbb9e575eb
2 changed files with 33 additions and 2 deletions

View file

@ -490,7 +490,8 @@ class UpdateTablesTask extends SwingWorker<Void, Collection<TableView>> {
@Override
protected Void doInBackground() throws Exception {
while (!isCancelled()) {
this.publish(session.getTables(roomId));
Collection<TableView> tables = session.getTables(roomId);
if (tables != null) this.publish(tables);
Thread.sleep(1000);
}
return null;