[OpenLayers-Commits] r4767 - sandbox/ahocevar/sldRenderer/lib/OpenLayers/Layer

commits at openlayers.org commits at openlayers.org
Tue Oct 2 23:32:19 EDT 2007


Author: ahocevar
Date: 2007-10-02 23:32:17 -0400 (Tue, 02 Oct 2007)
New Revision: 4767

Modified:
   sandbox/ahocevar/sldRenderer/lib/OpenLayers/Layer/Vector.js
Log:
added additional check to avoid problems with nulled feature styles

Modified: sandbox/ahocevar/sldRenderer/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/ahocevar/sldRenderer/lib/OpenLayers/Layer/Vector.js	2007-10-03 03:09:58 UTC (rev 4766)
+++ sandbox/ahocevar/sldRenderer/lib/OpenLayers/Layer/Vector.js	2007-10-03 03:32:17 UTC (rev 4767)
@@ -339,7 +339,8 @@
     drawFeature: function(feature, style) {
         if(style == null) {
             // apply sld styles to the feature style
-            if (feature.style.CLASS_NAME == "OpenLayers.Style") {
+            if (feature.style &&
+                    feature.style.CLASS_NAME == "OpenLayers.Style") {
                 style = feature.style.createStyle(feature);
             } else
             if(feature.style) {



More information about the Commits mailing list