Fix ImmediateDetach in AlterationObserver (ticket #130)
authorBalazs Dezso <deba@inf.elte.hu>
Wed, 23 Jul 2008 15:24:52 +0200
changeset 230af4e8ba94294
parent 228 b6732e0d38c5
child 231 9ce7a01a95c7
Fix ImmediateDetach in AlterationObserver (ticket #130)
lemon/bits/alteration_notifier.h
     1.1 --- a/lemon/bits/alteration_notifier.h	Mon Jul 21 16:30:28 2008 +0200
     1.2 +++ b/lemon/bits/alteration_notifier.h	Wed Jul 23 15:24:52 2008 +0200
     1.3 @@ -409,9 +409,9 @@
     1.4            (*it)->erase(item);
     1.5            ++it;
     1.6          } catch (const ImmediateDetach&) {
     1.7 -          it = _observers.erase(it);
     1.8            (*it)->_index = _observers.end();
     1.9            (*it)->_notifier = 0;
    1.10 +          it = _observers.erase(it);
    1.11          }
    1.12        }
    1.13      }
    1.14 @@ -429,9 +429,9 @@
    1.15            (*it)->erase(items);
    1.16            ++it;
    1.17          } catch (const ImmediateDetach&) {
    1.18 -          it = _observers.erase(it);
    1.19            (*it)->_index = _observers.end();
    1.20            (*it)->_notifier = 0;
    1.21 +          it = _observers.erase(it);
    1.22          }
    1.23        }
    1.24      }
    1.25 @@ -468,9 +468,9 @@
    1.26            (*it)->clear();
    1.27            ++it;
    1.28          } catch (const ImmediateDetach&) {
    1.29 -          it = _observers.erase(it);
    1.30            (*it)->_index = _observers.end();
    1.31            (*it)->_notifier = 0;
    1.32 +          it = _observers.erase(it);
    1.33          }
    1.34        }
    1.35      }