Handler.RegularPolygon.clear: check if this.layer is set. r=bartvde (closes #2701)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10423 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -379,8 +379,10 @@ OpenLayers.Handler.RegularPolygon = OpenLayers.Class(OpenLayers.Handler.Drag, {
|
|||||||
* is true).
|
* is true).
|
||||||
*/
|
*/
|
||||||
clear: function() {
|
clear: function() {
|
||||||
this.layer.renderer.clear();
|
if (this.layer) {
|
||||||
this.layer.destroyFeatures();
|
this.layer.renderer.clear();
|
||||||
|
this.layer.destroyFeatures();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user