diff --git a/src/plugins/cpptools/symbolfinder.cpp b/src/plugins/cpptools/symbolfinder.cpp
index 33329d1046cbc791a75e4d9877ad511a83bf1182..9d63361bbf14ad8e0d0b1c0b5e5de6961c4743bc 100644
--- a/src/plugins/cpptools/symbolfinder.cpp
+++ b/src/plugins/cpptools/symbolfinder.cpp
@@ -217,6 +217,9 @@ void SymbolFinder::findMatchingDeclaration(const LookupContext &context,
                                            QList<Declaration *> *argumentCountMatch,
                                            QList<Declaration *> *nameMatch)
 {
+    if (!functionType)
+        return;
+
     Scope *enclosingScope = functionType->enclosingScope();
     while (! (enclosingScope->isNamespace() || enclosingScope->isClass()))
         enclosingScope = enclosingScope->enclosingScope();