From 2d5dfc7b152d79c14e9d2e695c46eb50d84af708 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 18 Jun 2009 23:05:14 +0200 Subject: [PATCH] Pattern: properly advance iterator when removing notes We must not keep the iterator at the same position when erasing notes from the m_notes array. This usually is not a problem when using QVector but we might switch to QList somewhen later. Signed-off-by: Tobias Doerffel --- src/tracks/pattern.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracks/pattern.cpp b/src/tracks/pattern.cpp index 37b6c8c68..1c8cbafc8 100644 --- a/src/tracks/pattern.cpp +++ b/src/tracks/pattern.cpp @@ -611,7 +611,7 @@ void pattern::changeTimeSignature( void ) if( ( *it )->length() == 0 && ( *it )->pos() >= last_pos ) { delete *it; - m_notes.erase( it ); + it = m_notes.erase( it ); --m_steps; } else