diff --git a/src/ol/interaction/selectinteraction.js b/src/ol/interaction/selectinteraction.js index 660af12e48..e0de6a694d 100644 --- a/src/ol/interaction/selectinteraction.js +++ b/src/ol/interaction/selectinteraction.js @@ -200,8 +200,10 @@ ol.interaction.Select.prototype.removeFeature_ = function(feature) { features.remove(feature); for (i = 0, ii = hash[uid].length; i < ii; i++) { layer = hash[uid][i]; - goog.asserts.assertInstanceof(layer, ol.layer.Vector); - layer.getSkippedFeatures().remove(feature); + if (!goog.isNull(layer)) { + goog.asserts.assertInstanceof(layer, ol.layer.Vector); + layer.getSkippedFeatures().remove(feature); + } } delete hash[uid]; };