diff --git a/src/com/mrcrayfish/modelcreator/ModelCreator.java b/src/com/mrcrayfish/modelcreator/ModelCreator.java index e27fe59..c1b6576 100644 --- a/src/com/mrcrayfish/modelcreator/ModelCreator.java +++ b/src/com/mrcrayfish/modelcreator/ModelCreator.java @@ -157,6 +157,16 @@ public void windowClosing(WindowEvent e) { Display.create(); + Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() + { + @Override + public void uncaughtException (Thread thread, final Throwable ex) + { + Display.destroy(); + System.exit(0); + } + }); + WelcomeDialog.show(ModelCreator.this); loop();