Commit 4e254f2d authored by dt's avatar dt
Browse files

Fix crash after removing target

Reported on irc by ckamm
parent aa5d5c6b
......@@ -91,9 +91,7 @@ void TargetSelector::removeTarget(int index)
m_targets.removeAt(index);
if (m_currentTargetIndex >= m_targets.count()) {
setCurrentIndex(-1);
} else if (m_currentTargetIndex >= index) {
if (m_currentTargetIndex > index) {
--m_currentTargetIndex;
// force a signal since the index has changed
emit currentChanged(m_currentTargetIndex, m_targets.at(m_currentTargetIndex).currentSubIndex);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment