X-Git-Url: https://git.gag.com/?p=debian%2Fopenrocket;a=blobdiff_plain;f=src%2Fnet%2Fsf%2Fopenrocket%2Fgui%2Fmain%2FExceptionHandler.java;h=4099f019120d4c4942c5db5c1b795854ea96d29d;hp=702c3025cf5d866644f5a85dbf93d9e395f57bff;hb=f8aca85893990faf46d59ab89e9861f46c66dff3;hpb=6d71a8c4a93455ea8d3df1ed42d33b941847efcc diff --git a/src/net/sf/openrocket/gui/main/ExceptionHandler.java b/src/net/sf/openrocket/gui/main/ExceptionHandler.java index 702c3025..4099f019 100644 --- a/src/net/sf/openrocket/gui/main/ExceptionHandler.java +++ b/src/net/sf/openrocket/gui/main/ExceptionHandler.java @@ -103,14 +103,14 @@ public class ExceptionHandler implements Thread.UncaughtExceptionHandler { * @param exception the exception that occurred. */ public static void handleErrorCondition(final Exception exception) { - final ExceptionHandler handler; + final ExceptionHandler handler = instance; try { - if (instance == null) { - handler = new ExceptionHandler(); - } else { - handler = instance; + if (handler == null) { + // Not initialized, simply print the exception + exception.printStackTrace(); + return; } final Thread thread = Thread.currentThread();