mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-28 09:24:14 +01:00
Avoid error on save, if canceled theme instalation
This commit is contained in:
parent
4007b8470d
commit
c906806a47
@ -798,7 +798,10 @@ public class Preferences extends javax.swing.JDialog {
|
||||
if (comboTheme.getSelectedIndex() == 0) {
|
||||
PreferencesData.set("theme.file", "");
|
||||
} else {
|
||||
PreferencesData.set("theme.file", ((ZippedTheme) comboTheme.getSelectedItem()).getKey());
|
||||
Object selectedItem = comboTheme.getSelectedItem();
|
||||
if(selectedItem instanceof ZippedTheme) {
|
||||
PreferencesData.set("theme.file", ((ZippedTheme) selectedItem).getKey());
|
||||
}
|
||||
}
|
||||
|
||||
String newSizeText = fontSizeField.getText();
|
||||
|
Loading…
Reference in New Issue
Block a user