aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/clangcodemodel/clangfollowsymbol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/clangcodemodel/clangfollowsymbol.cpp b/src/plugins/clangcodemodel/clangfollowsymbol.cpp
index f503a777d2..dab5b52dc6 100644
--- a/src/plugins/clangcodemodel/clangfollowsymbol.cpp
+++ b/src/plugins/clangcodemodel/clangfollowsymbol.cpp
@@ -85,10 +85,10 @@ static int includePathStartIndex(const QVector<ClangBackEnd::TokenInfoContainer>
}
static int includePathEndIndex(const QVector<ClangBackEnd::TokenInfoContainer> &marks,
- int currentIndex)
+ int currentIndex)
{
int endIndex = currentIndex + 1;
- while (isValidIncludePathToken(marks[endIndex]))
+ while (endIndex < marks.size() && isValidIncludePathToken(marks[endIndex]))
++endIndex;
return endIndex - 1;
}