cginternals / globjects

C++ library strictly wrapping OpenGL objects.
https://globjects.org
MIT License
539 stars 59 forks source link

Fix iterator invalidation in ChangeListener #293

Closed j-o closed 9 years ago

j-o commented 9 years ago

Since Changaable::deregisterListener calls ChangeListener::removeSubject, the m_subjects container is modified and thus the iterators used in the for loop are invalidated, causing an assertion failure in debug mode on MSVC 2015.