Changeset 2708 in josm for trunk/src/org


Ignore:
Timestamp:
2009-12-30T00:59:21+01:00 (14 years ago)
Author:
stoecker
Message:

close #4260 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r2613 r2708  
    308308
    309309        try {
     310            String defaultlaf = platform.getDefaultStyle();
    310311            try {
    311                 String laf = Main.pref.get("laf", platform.getDefaultStyle());
     312                String laf = Main.pref.get("laf", defaultlaf);
    312313                if(laf != null && laf.length() > 0) {
    313314                    UIManager.setLookAndFeel(laf);
    314315                }
    315316            }
     317            catch (final java.lang.ClassNotFoundException e) {
     318                System.out.println("Look and Feel not found: " + Main.pref.get("laf"));
     319                Main.pref.put("laf", defaultlaf);
     320            }
    316321            catch (final javax.swing.UnsupportedLookAndFeelException e) {
    317322                System.out.println("Look and Feel not supported: " + Main.pref.get("laf"));
     323                Main.pref.put("laf", defaultlaf);
    318324            }
    319325            toolbar = new ToolbarPreferences();
Note: See TracChangeset for help on using the changeset viewer.