small error corrections

This commit is contained in:
Azra Victor
2021-06-10 14:06:15 +02:00
committed by no
parent 4ad12a3a59
commit ea4762c50e
2 changed files with 8 additions and 3 deletions

View File

@ -40,8 +40,13 @@ public class nextFrameBuffer {
}
public void goToNext() {
this.current = this.next.current;
this.next = this.next.next;
try {
this.current = this.next.current;
this.next = this.next.next;
} catch (NullPointerException n) {
this.setCurrentFrame(null);
this.setNext(new nextFrameBuffer());
}
}
public Frame getCurrentFrame() {