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
1 changed files with 2 additions and 1 deletions

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) {