changed nextframebuffer.clone() so it hopefully won't crash

This commit is contained in:
Azra Victor 2021-06-23 20:05:39 +02:00 committed by no
parent 6c9c87b50e
commit f1eb93c647

View File

@ -24,8 +24,21 @@ public class nextFrameBuffer {
} }
public void clone(nextFrameBuffer f) { public void clone(nextFrameBuffer f) {
this.current = f.current;
this.next = f.next; try{
Frame cf = new Frame();
cf.clone(f.current);
this.current = cf; }
catch (NullPointerException n) {
this.current = null;
this.next = null;
}
nextFrameBuffer nfb = new nextFrameBuffer();
try {
nfb.clone(f.next);
} catch (NullPointerException n) {}
this.next = nfb;
} }
public void setNext(nextFrameBuffer f) { public void setNext(nextFrameBuffer f) {