diff options
Diffstat (limited to 'src/plugins/projectexplorer/targetselector.h')
-rw-r--r-- | src/plugins/projectexplorer/targetselector.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/targetselector.h b/src/plugins/projectexplorer/targetselector.h index 7abe969682..f25f4f1de4 100644 --- a/src/plugins/projectexplorer/targetselector.h +++ b/src/plugins/projectexplorer/targetselector.h @@ -62,7 +62,10 @@ public: Target targetAt(int index) const; int targetCount() const { return m_targets.size(); } int currentIndex() const { return m_currentTargetIndex; } - int currentSubIndex() const { return m_targets.at(m_currentTargetIndex).currentSubIndex; } + int currentSubIndex() const { + return m_currentTargetIndex == -1 ? -1 + : m_targets.at(m_currentTargetIndex).currentSubIndex; + } void setTargetMenu(QMenu *menu); |