From 679e4805a01c2a401ed9511935520d062c6515eb Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Mon, 17 Jun 2019 12:01:39 +0200 Subject: [PATCH] Fix error popup in replay editor being off-screen --- .../replaymod/editor/gui/GuiEditReplay.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/replaymod/editor/gui/GuiEditReplay.java b/src/main/java/com/replaymod/editor/gui/GuiEditReplay.java index 56b7e481..cb66ac33 100644 --- a/src/main/java/com/replaymod/editor/gui/GuiEditReplay.java +++ b/src/main/java/com/replaymod/editor/gui/GuiEditReplay.java @@ -158,14 +158,19 @@ public class GuiEditReplay extends AbstractGuiPopup { try { MarkerProcessor.apply(inputPath, progressPopup.progressBar::setProgress); - } catch (Throwable e) { - Utils.error(ReplayModEditor.LOGGER, this, CrashReport.create(e, "Running marker processor"), this::close); - } - ReplayMod.instance.runLater(() -> { - progressPopup.close(); - close(); - }); + ReplayMod.instance.runLater(() -> { + progressPopup.close(); + close(); + }); + } catch (Throwable e) { + e.printStackTrace(); // in case runLater fails + CrashReport crashReport = CrashReport.create(e, "Running marker processor"); + ReplayMod.instance.runLater(() -> Utils.error(ReplayModEditor.LOGGER, this, crashReport, () -> { + progressPopup.close(); + close(); + })); + } }).start(); }