summaryrefslogtreecommitdiff
path: root/enigma-swing/src/main/java/cuchaz
diff options
context:
space:
mode:
authorGravatar Joe2025-09-10 14:40:06 +0100
committerGravatar modmuss2025-09-13 09:14:23 +0100
commita391f202f5cccfeaa55ed30cd43f1b2a697aeb73 (patch)
tree9328d121a1732062a871b255d1559eb39331b9b5 /enigma-swing/src/main/java/cuchaz
parentAdd a way for plugins to invalidate data (mappings, javadocs, decompile), and... (diff)
downloadenigma-fork-a391f202f5cccfeaa55ed30cd43f1b2a697aeb73.tar.gz
enigma-fork-a391f202f5cccfeaa55ed30cd43f1b2a697aeb73.tar.xz
enigma-fork-a391f202f5cccfeaa55ed30cd43f1b2a697aeb73.zip
Fix threading issues in ClassHandleProvider that are likely to come up if a plugin frequently invalidates class handles
Diffstat (limited to 'enigma-swing/src/main/java/cuchaz')
-rw-r--r--enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java
index fb30f87..6b341ee 100644
--- a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java
+++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java
@@ -333,15 +333,13 @@ public class EditorPanel {
333 } 333 }
334 334
335 private void handleDecompilerResult(Result<DecompiledClassSource, ClassHandleError> res) { 335 private void handleDecompilerResult(Result<DecompiledClassSource, ClassHandleError> res) {
336 SwingUtilities.invokeLater(() -> { 336 if (res.isOk()) {
337 if (res.isOk()) { 337 this.setSource(res.unwrap());
338 this.setSource(res.unwrap()); 338 } else {
339 } else { 339 this.displayError(res.unwrapErr());
340 this.displayError(res.unwrapErr()); 340 }
341 }
342 341
343 this.nextReference = null; 342 this.nextReference = null;
344 });
345 } 343 }
346 344
347 public void displayError(ClassHandleError t) { 345 public void displayError(ClassHandleError t) {