trying to avoid a stack overflow in nextFrameBuffer

This commit is contained in:
no 2021-06-10 14:20:14 +02:00
parent ea4762c50e
commit f6d44128b2

View File

@ -41,8 +41,10 @@ public class nextFrameBuffer {
public void goToNext() {
try {
nextFrameBuffer nfb = new nextFrameBuffer();
nfb.clone(this.next);
this.current = this.next.current;
this.next = this.next.next;
this.next.clone(nfb);
} catch (NullPointerException n) {
this.setCurrentFrame(null);
this.setNext(new nextFrameBuffer());