# HG changeset patch
# User Balazs Dezso <deba@inf.elte.hu>
# Date 1216819492 -7200
# Node ID af4e8ba94294a7854bd448deb64744cef238dcf4
# Parent b6732e0d38c5c5e6b21123d8425a62591491e391
Fix ImmediateDetach in AlterationObserver (ticket #130)
diff -r b6732e0d38c5 -r af4e8ba94294 lemon/bits/alteration_notifier.h
a
|
b
|
|
409 | 409 | (*it)->erase(item); |
410 | 410 | ++it; |
411 | 411 | } catch (const ImmediateDetach&) { |
412 | | it = _observers.erase(it); |
413 | 412 | (*it)->_index = _observers.end(); |
414 | 413 | (*it)->_notifier = 0; |
| 414 | it = _observers.erase(it); |
415 | 415 | } |
416 | 416 | } |
417 | 417 | } |
… |
… |
|
429 | 429 | (*it)->erase(items); |
430 | 430 | ++it; |
431 | 431 | } catch (const ImmediateDetach&) { |
432 | | it = _observers.erase(it); |
433 | 432 | (*it)->_index = _observers.end(); |
434 | 433 | (*it)->_notifier = 0; |
| 434 | it = _observers.erase(it); |
435 | 435 | } |
436 | 436 | } |
437 | 437 | } |
… |
… |
|
468 | 468 | (*it)->clear(); |
469 | 469 | ++it; |
470 | 470 | } catch (const ImmediateDetach&) { |
471 | | it = _observers.erase(it); |
472 | 471 | (*it)->_index = _observers.end(); |
473 | 472 | (*it)->_notifier = 0; |
| 473 | it = _observers.erase(it); |
474 | 474 | } |
475 | 475 | } |
476 | 476 | } |