Fixed IllegalStateException when trying to show graceful shutdown dialog from non-FX thread

This commit is contained in:
Tobias Hagemann
2019-02-28 15:38:45 +01:00
parent a70401596f
commit ab77673fed

View File

@@ -213,7 +213,7 @@ public class MainController implements ViewController {
stage.getIcons().add(new Image(getClass().getResourceAsStream("/window_icon_32.png")));
Application.setUserAgentStylesheet(getClass().getResource("/css/win_theme.css").toString());
}
exitUtil.initExitHandler(this::gracefulShutdown);
exitUtil.initExitHandler(() -> Platform.runLater(this::gracefulShutdown));
listenToFileOpenRequests(stage);
}