Opened 8 years ago

Closed 8 years ago

#636 closed bug (fixed)

Layer destroy() needs to be wary of double-destroys

Reported by: euzuro Owned by:
Priority: major Milestone: 2.4 Release
Component: Layer Version: 2.4 RC1
Keywords: Cc:
State:

Description

If OpenLayers.Layer.destroy() gets called twice, line 191:

       this.events.destroy();

will raise an error, because this.events will be nulled out.

This might happen in a custom layer which implements more than one Layer superclass, (like OpenLayers.Layer.Markers and OpenLayers.Layer.HTTPRequest, for example), since it should be calling both destroys, and both destroys will call the generic OpenLayers.Layer.destroy()

Attachments (1)

layer.patch (427 bytes) - added by euzuro 8 years ago.
be more wary in destroy() of OpenLayers.Layer

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by euzuro

be more wary in destroy() of OpenLayers.Layer

comment:1 Changed 8 years ago by sderle

no braner. go for it.

comment:2 Changed 8 years ago by euzuro

  • Resolution set to fixed
  • Status changed from new to closed

r3023. thx sde

comment:3 Changed 8 years ago by euzuro

  • Keywords pullup added; review removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

oops. forgot we're in a release cycle. reopening, marking as 'pullup'

comment:4 Changed 8 years ago by crschmidt

  • Keywords pullup removed
  • Resolution set to fixed
  • Status changed from reopened to closed

Brought up to 2.4 branch for RC2 with r3088

Note: See TracTickets for help on using tickets.