Added more protection around getDesktop calls. First test
Desktop.isDesktopSupported() and fail fast.
This commit is contained in:
parent
ee38ef2d3d
commit
4421b0ef85
@ -47,7 +47,7 @@ public class EditDecalDialog extends JDialog {
|
|||||||
|
|
||||||
ButtonGroup execGroup = new ButtonGroup();
|
ButtonGroup execGroup = new ButtonGroup();
|
||||||
|
|
||||||
if (Desktop.getDesktop().isSupported(Desktop.Action.EDIT)) {
|
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.EDIT)) {
|
||||||
|
|
||||||
systemRadio = new JRadioButton(trans.get("EditDecalDialog.lbl.system"));
|
systemRadio = new JRadioButton(trans.get("EditDecalDialog.lbl.system"));
|
||||||
systemRadio.setSelected(true);
|
systemRadio.setSelected(true);
|
||||||
|
@ -490,7 +490,7 @@ public class PreferencesDialog extends JDialog {
|
|||||||
panel.add(showPrompt, "wrap");
|
panel.add(showPrompt, "wrap");
|
||||||
execGroup.add(showPrompt);
|
execGroup.add(showPrompt);
|
||||||
|
|
||||||
if (Desktop.getDesktop().isSupported(Desktop.Action.EDIT)) {
|
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.EDIT)) {
|
||||||
|
|
||||||
JRadioButton systemRadio = new JRadioButton(trans.get("EditDecalDialog.lbl.system"));
|
JRadioButton systemRadio = new JRadioButton(trans.get("EditDecalDialog.lbl.system"));
|
||||||
systemRadio.setSelected(preferences.isDecalEditorPreferenceSystem());
|
systemRadio.setSelected(preferences.isDecalEditorPreferenceSystem());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user