From a391f202f5cccfeaa55ed30cd43f1b2a697aeb73 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 10 Sep 2025 14:40:06 +0100 Subject: Fix threading issues in ClassHandleProvider that are likely to come up if a plugin frequently invalidates class handles --- .../main/java/cuchaz/enigma/gui/panels/EditorPanel.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'enigma-swing/src/main') 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 fb30f87a..6b341ee0 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 { } private void handleDecompilerResult(Result res) { - SwingUtilities.invokeLater(() -> { - if (res.isOk()) { - this.setSource(res.unwrap()); - } else { - this.displayError(res.unwrapErr()); - } + if (res.isOk()) { + this.setSource(res.unwrap()); + } else { + this.displayError(res.unwrapErr()); + } - this.nextReference = null; - }); + this.nextReference = null; } public void displayError(ClassHandleError t) { -- cgit v1.2.3