Fix potential stack overflow

This commit is contained in:
Jesse Boyd 2018-06-07 03:49:14 +10:00
parent 4049014cb8
commit 3dbe0e9c30
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -217,7 +217,8 @@ public class AbstractDelegateExtent implements LightingExtent {
@Nullable
Operation commit() {
Operation ours = commitBefore();
Operation other = extent.commit();
Operation other = null;
if (extent != this) other = extent.commit();
if (ours != null && other != null) {
return new OperationQueue(ours, other);
} else if (ours != null) {