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) ...@@ -91,9 +91,7 @@ void TargetSelector::removeTarget(int index)
m_targets.removeAt(index); m_targets.removeAt(index);
if (m_currentTargetIndex >= m_targets.count()) { if (m_currentTargetIndex > index) {
} else if (m_currentTargetIndex >= index) {
--m_currentTargetIndex; --m_currentTargetIndex;
// force a signal since the index has changed // force a signal since the index has changed
emit currentChanged(m_currentTargetIndex,; emit currentChanged(m_currentTargetIndex,;
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