aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/cpptools/cppfollowsymbolundercursor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppfollowsymbolundercursor.cpp b/src/plugins/cpptools/cppfollowsymbolundercursor.cpp
index a21babf852..9f26de16d3 100644
--- a/src/plugins/cpptools/cppfollowsymbolundercursor.cpp
+++ b/src/plugins/cpptools/cppfollowsymbolundercursor.cpp
@@ -347,7 +347,7 @@ Link attemptDeclDef(const QTextCursor &cursor, Snapshot snapshot,
funcDecl = decl->postfix_declarator_list->value->asFunctionDeclarator();
if (funcDecl)
target = symbolFinder->findMatchingDefinition(funcDecl->symbol, snapshot);
- else
+ else if (simpleDecl->symbols)
target = symbolFinder->findMatchingVarDefinition(simpleDecl->symbols->value, snapshot);
}