Changeset 4970 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2012-02-17T22:57:46+01:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/preferences
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r4968 r4970 228 228 */ 229 229 public List<PluginInformation> getPluginsScheduledForUpdateOrDownload() { 230 return model .getPluginsScheduledForUpdateOrDownload();230 return model != null ? model.getPluginsScheduledForUpdateOrDownload() : null; 231 231 } 232 232 -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
r4968 r4970 230 230 final List<PluginInformation> toDownload = preference.getPluginsScheduledForUpdateOrDownload(); 231 231 final PluginDownloadTask task; 232 if ( ! toDownload.isEmpty()) {232 if (toDownload != null && ! toDownload.isEmpty()) { 233 233 task = new PluginDownloadTask(this, toDownload, tr("Download plugins")); 234 234 } else { … … 247 247 } 248 248 249 for (PreferenceSetting setting : settings ) {249 for (PreferenceSetting setting : settingsInitialized) { 250 250 if (setting.ok()) { 251 251 requiresRestart = true; … … 463 463 PreferenceTab tab = (PreferenceTab) sel; 464 464 TabPreferenceSetting preferenceSettings = tab.getTabPreferenceSetting(); 465 //System.out.println(preferenceSettings);466 465 if (!settingsInitialized.contains(preferenceSettings)) { 467 466 try { 468 //System.out.println("adding GUI for "+preferenceSettings);469 467 getModel().removeChangeListener(this); 470 468 preferenceSettings.addGui(this); … … 474 472 SubPreferenceSetting sps = (SubPreferenceSetting) setting; 475 473 if (sps.getTabPreferenceSetting(this) == preferenceSettings) { 476 //System.out.println("adding GUI for "+sps); 477 sps.addGui(this); 474 try { 475 sps.addGui(this); 476 } catch (SecurityException ex) { 477 ex.printStackTrace(); 478 } catch (Throwable ex) { 479 BugReportExceptionHandler.handleException(ex); 480 } finally { 481 settingsInitialized.add(sps); 482 } 478 483 } 479 484 }
Note:
See TracChangeset
for help on using the changeset viewer.