Skip to content

Commit 8c9f71d

Browse files
committed
fix: crashing with terralith
1 parent 584e85f commit 8c9f71d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/mixin/MixinChunkNoiseSamplerCacheOnce.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private void wrapFill(double[] densities, DensityFunction.EachApplier applier, O
112112

113113
@Override
114114
public void c2me$cache(double[] res, int[] x, int[] y, int[] z, EvalType evalType) {
115-
if (this.c2me$lastValuea.length == res.length) {
115+
if (c2me$lastValuea != null && this.c2me$lastValuea.length == res.length) {
116116
System.arraycopy(res, 0, this.c2me$lastValuea, 0, this.c2me$lastValuea.length);
117117
System.arraycopy(x, 0, this.c2me$lastXa, 0, this.c2me$lastValuea.length);
118118
System.arraycopy(y, 0, this.c2me$lastYa, 0, this.c2me$lastValuea.length);

0 commit comments

Comments
 (0)