From f12a407a7d80145e77d68f3a09d1939125f95c4e Mon Sep 17 00:00:00 2001 From: Francois Blackburn Date: Wed, 8 Jun 2016 08:56:14 -0400 Subject: [PATCH] Fix a crash in select interaction default styling function when receiving a feature without geometry --- src/ol/interaction/select.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ol/interaction/select.js b/src/ol/interaction/select.js index d4c9e4ce26..a71d9f8aad 100644 --- a/src/ol/interaction/select.js +++ b/src/ol/interaction/select.js @@ -301,6 +301,9 @@ ol.interaction.Select.getDefaultStyleFunction = function() { styles[ol.geom.GeometryType.LINE_STRING]); return function(feature, resolution) { + if (!feature.getGeometry()) { + return null; + } return styles[feature.getGeometry().getType()]; }; };