Check for null layers (for postcompose hitdetection)

This commit is contained in:
Antoine Abt
2014-03-04 13:59:40 +01:00
parent c8de4d908d
commit e91db0f9af

View File

@@ -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];
};