# HG changeset patch # User Balazs Dezso # Date 2008-07-23 15:24:52 # Node ID af4e8ba94294a7854bd448deb64744cef238dcf4 # Parent b6732e0d38c5c5e6b21123d8425a62591491e391 Fix ImmediateDetach in AlterationObserver (ticket #130) diff --git a/lemon/bits/alteration_notifier.h b/lemon/bits/alteration_notifier.h --- a/lemon/bits/alteration_notifier.h +++ b/lemon/bits/alteration_notifier.h @@ -409,9 +409,9 @@ (*it)->erase(item); ++it; } catch (const ImmediateDetach&) { - it = _observers.erase(it); (*it)->_index = _observers.end(); (*it)->_notifier = 0; + it = _observers.erase(it); } } } @@ -429,9 +429,9 @@ (*it)->erase(items); ++it; } catch (const ImmediateDetach&) { - it = _observers.erase(it); (*it)->_index = _observers.end(); (*it)->_notifier = 0; + it = _observers.erase(it); } } } @@ -468,9 +468,9 @@ (*it)->clear(); ++it; } catch (const ImmediateDetach&) { - it = _observers.erase(it); (*it)->_index = _observers.end(); (*it)->_notifier = 0; + it = _observers.erase(it); } } }