diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index e106306e0af9bbd6c9fbc4fba1f0d8c771d24ed5..e30bdbc5d145a00fd62c6d16a4dbd087e765b713 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -1313,10 +1313,10 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor, if (def == lastVisibleSymbol) def = 0; // jump to declaration then. - } - if (symbol->isForwardClassDeclaration()) { - def = snapshot.findMatchingClassDeclaration(symbol); + if (symbol->isForwardClassDeclaration()) { + def = snapshot.findMatchingClassDeclaration(symbol); + } } link = linkToSymbol(def ? def : symbol);