Page MenuHomePhabricator

Overlays add observers mutliple times
Closed, ResolvedPublic

Description

If you call GenerateData() on overlays multiple times, multiple observers will be added to the Property. In the destructor, only the last one will be removed.

The solution is quite simple. Before adding a new observer on the property, remove the old one.

Event Timeline

[dc2ce9]: Merge branch 'bug-12720-overlays-remove-observers'

Merged commits:

2012-07-25 10:00:52 Markus Engel [5cd843]
adding some safety checks to avoid potetnial crashes


2012-07-25 10:00:28 Markus Engel [53db91]
removing observers before adding a new one

I changed the SetupCallback() to remove the old observer before adding a new one on the property.

Thus, only one observer is active at a time.