Commit 7403fe68 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Fixed crash in the cpp hover handler

Didn't check whether the lookup actually returned a valid symbol before
accessing the name.

Reviewed-by: Roberto Raggi
parent 20a270e4
...@@ -328,7 +328,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in ...@@ -328,7 +328,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
Symbol *lookupSymbol = result.second; // lookup symbol Symbol *lookupSymbol = result.second; // lookup symbol
Symbol *resolvedSymbol = lookupSymbol; Symbol *resolvedSymbol = lookupSymbol;
Name *resolvedName = lookupSymbol->name(); Name *resolvedName = lookupSymbol ? lookupSymbol->name() : 0;
firstType = resolve(firstType, typeOfExpression.lookupContext(), firstType = resolve(firstType, typeOfExpression.lookupContext(),
&resolvedSymbol, &resolvedName); &resolvedSymbol, &resolvedName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment