When trying to deactivate a control from within that control's featureAdded

event, a null exception is encountered. A null check fixes this bug. (Closes
#1143)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5433 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-12-15 21:29:06 +00:00
parent f746ed4211
commit 7881c2099a
4 changed files with 22 additions and 5 deletions

View File

@@ -79,7 +79,9 @@ OpenLayers.Handler.Path = OpenLayers.Class(OpenLayers.Handler.Point, {
*/
destroyFeature: function() {
OpenLayers.Handler.Point.prototype.destroyFeature.apply(this);
this.line.destroy();
if(this.line) {
this.line.destroy();
}
this.line = null;
},