diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bfe48738..0990eae4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased] ### Fixed - #1336 AS3 direct editation - Regexp / character escaping +- #1615 Turning off Checking for modifications disables SWF loading ## [14.0.0] - 2021-02-24 ### Added diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index 8d232fc1d..c0bc05ce7 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -1337,14 +1337,16 @@ public class Main { String fileName = si.getFile(); if (fileName != null) { Configuration.addRecentFile(fileName); - try { - File dir = new File(fileName).getParentFile(); - if (!watchedDirectories.containsValue(dir)) { - WatchKey key = dir.toPath().register(watcher, StandardWatchEventKinds.ENTRY_MODIFY); - watchedDirectories.put(key, dir); + if (watcher != null) { + try { + File dir = new File(fileName).getParentFile(); + if (!watchedDirectories.containsValue(dir)) { + WatchKey key = dir.toPath().register(watcher, StandardWatchEventKinds.ENTRY_MODIFY); + watchedDirectories.put(key, dir); + } + } catch (IOException ex) { + //ignore } - } catch (IOException ex) { - //ignore } } } @@ -1714,7 +1716,6 @@ public class Main { } } - if (watcher != null) { watcherWorker = new SwingWorker() { @Override