diff --git a/src/plugins/cpptools/cppfollowsymbolundercursor.cpp b/src/plugins/cpptools/cppfollowsymbolundercursor.cpp index a21babf8520..9f26de16d3e 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); }