Added Overlay try-catch

This commit is contained in:
mrbesen 2017-10-26 13:15:08 +02:00
parent 756924f1b7
commit 515301deda
1 changed files with 8 additions and 3 deletions

View File

@ -403,9 +403,14 @@ public class Clicker implements Runnable{
public void toggleOverlay() {
if(ov == null) {
ov = new Overlay();
ov.set(playout, cardslots, end, battle, arena_switch);
ov.init();
try {
ov = new Overlay();
ov.set(playout, cardslots, end, battle, arena_switch);
ov.init();
} catch(Exception e) {
System.out.println("Catched Exception, while inflateing Overlay: ");
e.printStackTrace();
}
} else {
ov.close();
ov = null;