File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/main/java/org/openstreetmap/josm/plugins/scripting/preferences/graalvm Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,10 @@ protected JPanel buildTabs() {
6767 if (GraalVMFacadeFactory .isGraalVMPresent ()) {
6868 tpPreferencesTabs .add (tr ("ES Module repositories" ),
6969 pnlESModuleRepoConfiguration = new ESModuleRepoConfigurationPanel ());
70+ tpPreferencesTabs .add (tr ("CommonJS module repositories" ),
71+ pnlCommonJSRepoConfiguration = new CommonJSRepoConfigurationPanel ());
7072 }
71- tpPreferencesTabs .add (tr ("CommonJS module repositories" ),
72- pnlCommonJSRepoConfiguration = new CommonJSRepoConfigurationPanel ());
73+
7374 pnl .add (tpPreferencesTabs , BorderLayout .CENTER );
7475 return pnl ;
7576 }
@@ -88,8 +89,12 @@ public GraalVMConfigurationPanel() {
8889 * Persist preferences to the JOSM preferences file.
8990 */
9091 public void persistToPreferences () {
91- pnlCommonJSRepoConfiguration .persistToPreferences ();
92- pnlESModuleRepoConfiguration .persistToPreferences ();
92+ if (pnlCommonJSRepoConfiguration != null ) {
93+ pnlCommonJSRepoConfiguration .persistToPreferences ();
94+ }
95+ if (pnlESModuleRepoConfiguration != null ) {
96+ pnlESModuleRepoConfiguration .persistToPreferences ();
97+ }
9398 }
9499
95100 @ Override
You can’t perform that action at this time.
0 commit comments