Skip to content

Commit

Permalink
Fix #4188 - Check for failed std::find (#5137)
Browse files Browse the repository at this point in the history
  • Loading branch information
Veratil authored and Reflexe committed Sep 14, 2019
1 parent b07c007 commit 8fdf6c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,10 @@ void PianoRoll::markSemiTone( int i )
for (int ix = 0; ix < aok.size(); ++ix)
{
i = std::find(m_markedSemiTones.begin(), m_markedSemiTones.end(), aok.at(ix));
m_markedSemiTones.erase(i);
if (i != m_markedSemiTones.end())
{
m_markedSemiTones.erase(i);
}
}
}
else
Expand Down

0 comments on commit 8fdf6c4

Please sign in to comment.