only grab screenshot and notify user if UI is present

master
melvin 2013-11-22 09:28:28 +08:00
parent 1d409b0a55
commit d64bd58234
1 changed files with 4 additions and 2 deletions

View File

@ -27,8 +27,10 @@ public class MagicGameReport implements Thread.UncaughtExceptionHandler {
public void uncaughtException(final Thread th, final Throwable ex) {
MagicGameReport.buildReport(MagicGame.getInstance(), th, ex);
grabScreenShot(MagicMain.rootFrame);
doNotifyUser();
if (MagicMain.rootFrame != null) {
grabScreenShot(MagicMain.rootFrame);
doNotifyUser();
}
System.exit(1);
}