fix NPE for Preferences.get() in Export to Application

This commit is contained in:
Ben Fry
2022-02-12 10:56:55 -05:00
parent a83f54a7df
commit 1bb5b3e60c
2 changed files with 8 additions and 0 deletions
@@ -78,6 +78,7 @@ public class ExportPrompt {
String pref = Preferences.get(EXPORT_VARIANTS);
if (pref == null) {
pref = Platform.getVariant(); // just add myself
Preferences.set(EXPORT_VARIANTS, pref);
}
StringList selectedVariants = new StringList(pref.split(","));
+7
View File
@@ -3,6 +3,8 @@ X update to Java 17.0.2+8
X move "Add Examples" to bottom of the Examples window
X remove anachronistic Preferences.save() that happens after opening a sketch
X change cmd-click in window title to point to sketch folder
X prevent NullPointerException on first use of Export to Application
X only showed up if no checkboxes were clicked
change detector
X text in second line of custom dialogs was showing too large
@@ -21,6 +23,11 @@ X https://github.com/processing/processing4/issues/398
X https://github.com/processing/processing4/pull/400
_ interface zoom now conflicting with the Java 9+ defaults
_ things look terrible (tiny fonts) on Windows, adjusting has weird effects
_ resolve in DefaultPlatform and Toolkit, disable ui in PreferencesFrame
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .