diff --git a/lib/OpenLayers/Control.js b/lib/OpenLayers/Control.js index f4e4f1edfd..75cb6dbfe2 100644 --- a/lib/OpenLayers/Control.js +++ b/lib/OpenLayers/Control.js @@ -28,7 +28,6 @@ OpenLayers.Control.prototype = { */ initialize: function (options) { Object.extend(this, options); - this.div = OpenLayers.Util.createDiv(); }, /** @@ -56,6 +55,9 @@ OpenLayers.Control.prototype = { * @type DOMElement */ draw: function (px) { + if (this.div == null) { + this.div = OpenLayers.Util.createDiv(); + } if (px != null) { this.position = px.clone(); }