Merge pull request #142 from kruland2607/master

Added more protection around getDesktop calls.  First test Desktop.isDesktopSupported() and fail fast.
This commit is contained in:
kruland2607 2013-09-16 08:27:51 -07:00
commit 1931a6f11e
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ public class EditDecalDialog extends JDialog {
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.setSelected(true);

View File

@ -490,7 +490,7 @@ public class PreferencesDialog extends JDialog {
panel.add(showPrompt, "wrap");
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"));
systemRadio.setSelected(preferences.isDecalEditorPreferenceSystem());