Skip to content
Snippets Groups Projects
Commit 3e953b03 authored by Christian Kamm's avatar Christian Kamm
Browse files

Check for null scope when hovering.


Fixes a segfault when hovering over QtCleanUpFunction in
qcoreapplication.h.

Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
parent dc831885
No related merge requests found
......@@ -337,7 +337,8 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
firstType = resolve(firstType, typeOfExpression.lookupContext(),
&resolvedSymbol, &resolvedName);
if (resolvedSymbol && resolvedSymbol->scope()->isClassScope()) {
if (resolvedSymbol && resolvedSymbol->scope()
&& resolvedSymbol->scope()->isClassScope()) {
Class *enclosingClass = resolvedSymbol->scope()->owner()->asClass();
if (Identifier *id = enclosingClass->identifier()) {
if (id->isEqualTo(resolvedSymbol->identifier()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment