Ticket #636 (closed bug: fixed)

Opened 8 years ago

Last modified 8 years ago

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

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

Change History

Changed 8 years ago by euzuro

be more wary in destroy() of OpenLayers.Layer

Changed 8 years ago by sderle

no braner. go for it.

Changed 8 years ago by euzuro

  • status changed from new to closed
  • resolution set to fixed

r3023. thx sde

Changed 8 years ago by euzuro

  • keywords pullup added; review removed
  • status changed from closed to reopened
  • resolution fixed deleted

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

Changed 8 years ago by crschmidt

  • keywords pullup removed
  • status changed from reopened to closed
  • resolution set to fixed

Brought up to 2.4 branch for RC2 with r3088

Note: See TracTickets for help on using tickets.