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:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user