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 @@ -286,6 +286,14 @@ public class PolicyEditor extends JPanel if (changesMade) { final int save = JOptionPane.showConfirmDialog(weakThis.get(), R("PESaveChanges")); if (save == JOptionPane.YES_OPTION) { + if (file == null) { + final int choice = fileChooser.showSaveDialog(weakThis.get()); + if (choice == JFileChooser.APPROVE_OPTION) { + file = fileChooser.getSelectedFile(); + } else if (choice == JFileChooser.CANCEL_OPTION) { + return; + } + } savePolicyFile(); } else if (save == JOptionPane.CANCEL_OPTION) { return;