summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2015-06-19 12:55:38 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2015-06-19 12:55:38 +0100
commita1932c7feba446dc0168d200d7f6808c39046962 (patch)
tree1b315515ee83ff63948cc950375303aaa942e9af
parent14f3d8005e67b99109984ae6c198cbd937d73998 (diff)
Correctly re-start an iteration (if we delete one of the items being iterated)
-rw-r--r--libs/canvas/wave_view.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/canvas/wave_view.cc b/libs/canvas/wave_view.cc
index 52f6ee9f33..55f5f0befe 100644
--- a/libs/canvas/wave_view.cc
+++ b/libs/canvas/wave_view.cc
@@ -1637,8 +1637,11 @@ WaveViewCache::consolidate_image_cache (boost::shared_ptr<ARDOUR::AudioSource> s
if (e2->start >= e1->start && e2->end <= e1->end) {
/* c2 is fully contained by c1, so delete it */
- c2 = caches.erase (c2);
- continue;
+ caches.erase (c2);
+
+ /* and re-start the whole iteration */
+ nxt = caches.begin ();
+ break;
}
c2 = nxt2;