Index: tempo_lines.cc
===================================================================
--- tempo_lines.cc	(révision 11787)
+++ tempo_lines.cc	(copie de travail)
@@ -229,6 +229,7 @@
 			//cout << "*** STEALING FROM LEFT" << endl;
 			assert(_lines.find(xpos) == _lines.end());
 			Lines::iterator steal = _lines.begin();
+			Lines::iterator save_steal = _lines.begin();
 			line = steal->second;
 			_lines.erase(steal);
 			line->property_color_rgba() = color;
@@ -239,8 +240,9 @@
 			invalidated = true;
 			
 			// Shift clean range right
-			_clean_left = max(_clean_left, steal->first);
+			_clean_left = max(_clean_left, save_steal->first);
 			_clean_right = max(_clean_right, xpos);
+			_lines.erase(save_steal);
 		}
 	}
 
