diff --git a/src/ol/structs/rbush.js b/src/ol/structs/rbush.js index 8dd8af4960..549c3be3da 100644 --- a/src/ol/structs/rbush.js +++ b/src/ol/structs/rbush.js @@ -614,7 +614,8 @@ ol.structs.RBush.prototype.remove_ = function(extent, value) { return; } } - ++index; + node = path.pop(); + index = indexes.pop(); } else if (index < node.children.length) { child = node.children[index]; if (ol.extent.containsExtent(child.extent, extent)) {