diff --git a/src/main/java/featurecat/lizzie/analysis/Leelaz.java b/src/main/java/featurecat/lizzie/analysis/Leelaz.java index 29c2323b..6f14ea8a 100644 --- a/src/main/java/featurecat/lizzie/analysis/Leelaz.java +++ b/src/main/java/featurecat/lizzie/analysis/Leelaz.java @@ -22,6 +22,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.swing.JOptionPane; +import javax.swing.SwingUtilities; import org.json.JSONException; import org.json.JSONObject; @@ -466,7 +467,8 @@ private void read() { while ((c = inputStream.read()) != -1) { line.append((char) c); if ((c == '\n')) { - parseLine(line.toString()); + String cmd = line.toString(); + SwingUtilities.invokeLater(() -> parseLine(cmd)); line = new StringBuilder(); } }