diff --git a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java --- a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java +++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java @@ -984,7 +984,9 @@ public class PolicyEditor extends JFrame try { FileUtils.saveFile(sb.toString(), file); - fileWatcher.update(); + if (fileWatcher != null) { + fileWatcher.update(); + } changesMade = false; showChangesSavedDialog(); } catch (final IOException e) { @@ -1026,6 +1028,9 @@ public class PolicyEditor extends JFrame * @throws IOException if the file cannot be read */ public int updateMd5WithDialog() throws FileNotFoundException, IOException { + if (fileWatcher == null) { + return JOptionPane.NO_OPTION; + } final boolean changed = fileWatcher.update(); if (changed) { return JOptionPane.showConfirmDialog(weakThis.get(), R("PEFileModifiedDetail", file.getCanonicalPath()),