fix NullPointerException in Theme Selector (resolves #476)

This commit is contained in:
Ben Fry
2022-04-23 06:27:36 -04:00
parent 03baa46300
commit a8c880b8b8
2 changed files with 9 additions and 3 deletions
@@ -139,10 +139,14 @@ public class ManagerFrame {
protected void updateTheme() {
Color bgColor = Theme.getColor("manager.tab.background");
frame.getContentPane().setBackground(bgColor);
// don't update if the Frame doesn't actually exist yet
// https://github.com/processing/processing4/issues/476
if (frame != null) {
Color bgColor = Theme.getColor("manager.tab.background");
frame.getContentPane().setBackground(bgColor);
tabs.updateTheme();
tabs.updateTheme();
}
}
+2
View File
@@ -9,6 +9,8 @@ X no longer pass a blank sketch file name from startup script
X also remove unused readlink
X support multiple files passed on command line
X only show setWritable() failure in recent.txt when it is a problem
X NullPointerException when changing the theme
X https://github.com/processing/processing4/issues/476
design
X set minimum size for scroll bar thumb