fix(gui): resolve exception in search dialog on project reload (#2714)

This commit is contained in:
Skylot
2025-12-03 19:38:27 +00:00
parent 39e7b82353
commit 74c52a8884
2 changed files with 7 additions and 6 deletions
@@ -86,11 +86,13 @@ public class JadxWrapper {
// TODO: check and move into core package
public void unloadClasses() {
for (ClassNode cls : getDecompiler().getRoot().getClasses()) {
ProcessState clsState = cls.getState();
cls.unload();
cls.setState(clsState == PROCESS_COMPLETE ? GENERATED_AND_UNLOADED : NOT_LOADED);
}
getCurrentDecompiler().ifPresent(decompiler -> {
for (ClassNode cls : decompiler.getRoot().getClasses()) {
ProcessState clsState = cls.getState();
cls.unload();
cls.setState(clsState == PROCESS_COMPLETE ? GENERATED_AND_UNLOADED : NOT_LOADED);
}
});
}
public void close() {
@@ -205,7 +205,6 @@ public class SearchDialog extends CommonSearchDialog {
removeActiveTabListener();
searchBackgroundExecutor.execute(() -> {
stopSearchTask();
mainWindow.getBackgroundExecutor().waitForComplete();
unloadTempData();
});
super.dispose();