mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
moved console update to EDT thread, this should solve NPE from http://www.slightlymagic.net/forum/viewtopic.php?p=115484#p115484
This commit is contained in:
@@ -4,6 +4,7 @@ import java.util.Observable;
|
||||
import java.util.Observer;
|
||||
|
||||
import forge.Command;
|
||||
import forge.FThreads;
|
||||
import forge.gui.framework.ICDoc;
|
||||
import forge.gui.match.views.VLog;
|
||||
|
||||
@@ -32,13 +33,18 @@ public enum CLog implements ICDoc, Observer {
|
||||
public void initialize() {
|
||||
|
||||
}
|
||||
|
||||
private static Runnable updateConsole = new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
VLog.SINGLETON_INSTANCE.updateConsole();
|
||||
}
|
||||
};
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.gui.framework.ICDoc#update()
|
||||
*/
|
||||
@Override
|
||||
public void update() {
|
||||
VLog.SINGLETON_INSTANCE.updateConsole();
|
||||
FThreads.invokeInEdtNowOrLater(updateConsole);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
Reference in New Issue
Block a user