Changeset 13960 in josm


Ignore:
Timestamp:
2018-06-20T18:00:26+02:00 (9 months ago)
Author:
Don-vip
Message:

fix #16410 - NPE

File:
1 edited

Legend:

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

    r13956 r13960  
    10281028
    10291029        final SplashScreen splash = GuiHelper.runInEDTAndWaitAndReturn(SplashScreen::new);
    1030         final SplashScreen.SplashProgressMonitor monitor = splash.getProgressMonitor();
     1030        // splash can be null sometimes on Linux, in this case try to load JOSM silently
     1031        final SplashProgressMonitor monitor = splash != null ? splash.getProgressMonitor() : new SplashProgressMonitor(null, e -> {
     1032            Logging.debug(e.toString());
     1033        });
    10311034        monitor.beginTask(tr("Initializing"));
    1032         GuiHelper.runInEDT(() -> splash.setVisible(Config.getPref().getBoolean("draw.splashscreen", true)));
     1035        if (splash != null) {
     1036            GuiHelper.runInEDT(() -> splash.setVisible(Config.getPref().getBoolean("draw.splashscreen", true)));
     1037        }
    10331038        Main.setInitStatusListener(new InitStatusListener() {
    10341039
     
    10711076        // Wait for splash disappearance (fix #9714)
    10721077        GuiHelper.runInEDTAndWait(() -> {
    1073             splash.setVisible(false);
    1074             splash.dispose();
     1078            if (splash != null) {
     1079                splash.setVisible(false);
     1080                splash.dispose();
     1081            }
    10751082            mainFrame.setVisible(true);
    10761083        });
Note: See TracChangeset for help on using the changeset viewer.