Skip to content

Commit

Permalink
HuskyUI Safety
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki committed Jun 21, 2018
1 parent 9a7e6d7 commit 14ac8f8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/com/codehusky/huskyui/states/Page.java
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,21 @@ public void setObserver(final Player observer) {
}

public void interrupt(){
System.out.println("-++-\nINTERRUPT\nInterrupt Is Null: " + (this.interrupt == null) + "\nUpdater Task Is Null: " + (this.updaterTask == null));
if(this.interrupt != null) {
this.interrupt.run();
try {
this.interrupt.run();
}catch (Exception e){
HuskyUI.getLogger().error("Error occurred while running HuskyUI Page interrupt.");
e.printStackTrace();
}
System.out.println("Interrupt ran.");
}
if(updaterTask != null) {
updaterTask.cancel();
System.out.println("Updater cancelled");
updaterTask = null;
System.out.println("Updater set to null.");
}
}

Expand Down

0 comments on commit 14ac8f8

Please sign in to comment.