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 <tobias.doerffel@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user