Skip to content

Commit 1704313

Browse files
author
Loki
committed
Fixed interrupts
1 parent 5029ae3 commit 1704313

File tree

1 file changed

+4
-1
lines changed
  • src/main/java/com/codehusky/huskyui/states

1 file changed

+4
-1
lines changed

src/main/java/com/codehusky/huskyui/states/Page.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,9 @@ public void setObserver(final Player observer) {
380380
}
381381

382382
public void interrupt(){
383-
this.interrupt.run();
383+
if(this.interrupt != null) {
384+
this.interrupt.run();
385+
}
384386
}
385387

386388
/**
@@ -407,6 +409,7 @@ public Page copy(@Nonnull final StateContainer newContainer) {
407409
builder.setCentered(this.centered);
408410
builder.setUpdateTickRate(updateTickRate);
409411
builder.setUpdater(updateConsumer);
412+
builder.setInterrupt(interrupt);
410413
builder.setUpdatable(updatable);
411414

412415
final Page page = builder.build(this.getId());

0 commit comments

Comments
 (0)