make sure theme.txt exists before attempting rename

This commit is contained in:
Ben Fry
2022-07-21 15:50:58 -04:00
parent 005455b579
commit 33aae24623
@@ -324,6 +324,9 @@ public class ThemeSelector extends JFrame implements Tool {
* @return true if sketchbook/theme.txt does not match a built-in theme.
*/
private boolean userModifiedTheme() {
if (!sketchbookFile.exists()) {
return false;
}
String currentTheme = getCurrentTheme();
for (ThemeSet set : sets) {
if (set.getIndex(currentTheme) != -1) {