From 3dbe0e9c30d631c439fd06051b72aa3ef01b59f3 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 7 Jun 2018 03:49:14 +1000 Subject: [PATCH] Fix potential stack overflow --- .../com/sk89q/worldedit/extent/AbstractDelegateExtent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java b/core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java index f0a4ac70..c9be9b79 100644 --- a/core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java +++ b/core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java @@ -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) {