1 From 78617274b5acad1d89cb3bbe218b2930f9298ae4 Mon Sep 17 00:00:00 2001
2 From: arno <arno@renevier.net>
3 Date: Mon, 21 Mar 2011 20:11:21 +0100
4 Subject: [PATCH 3/5] fixes #2649
7 openlayers/lib/OpenLayers/Layer/Vector.js | 7 +++----
8 1 files changed, 3 insertions(+), 4 deletions(-)
10 diff --git a/openlayers/lib/OpenLayers/Layer/Vector.js b/openlayers/lib/OpenLayers/Layer/Vector.js
11 index d395d0e..904186f 100644
12 --- a/openlayers/lib/OpenLayers/Layer/Vector.js
13 +++ b/openlayers/lib/OpenLayers/Layer/Vector.js
14 @@ -762,10 +762,9 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
17 destroyFeatures: function(features, options) {
18 - var all = (features == undefined); // evaluates to true if
21 - features = this.features;
22 + var all = (features == undefined);
23 + if(all && this.features) {
24 + features = this.features.slice();
27 this.removeFeatures(features, options);