From 46bf2a35ba55161bd274e65e6eb729c27eb11f6b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 24 Dec 2015 00:01:41 +0100 Subject: [PATCH] Synchronize on projects when creating model --- src/main/java/de/todesbaum/jsite/gui/KeyDialog.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/todesbaum/jsite/gui/KeyDialog.java b/src/main/java/de/todesbaum/jsite/gui/KeyDialog.java index 6f2c38e..9797708 100644 --- a/src/main/java/de/todesbaum/jsite/gui/KeyDialog.java +++ b/src/main/java/de/todesbaum/jsite/gui/KeyDialog.java @@ -348,7 +348,9 @@ public class KeyDialog extends JDialog { final JLabel projectLabel = new JLabel(I18n.getMessage("jsite.key-dialog.label.project")); contentPanel.add(projectLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(12, 18, 0, 0), 0, 0)); - projectsComboBox = new JComboBox(new ComboBoxModelList(projects)); + synchronized (projects) { + projectsComboBox = new JComboBox(new ComboBoxModelList(projects)); + } projectsComboBox.addActionListener(new ActionListener() { @Override -- 2.7.4