forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -328,7 +328,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
|
||||
Symbol *lookupSymbol = result.second; // lookup symbol
|
||||
|
||||
Symbol *resolvedSymbol = lookupSymbol;
|
||||
Name *resolvedName = lookupSymbol->name();
|
||||
Name *resolvedName = lookupSymbol ? lookupSymbol->name() : 0;
|
||||
firstType = resolve(firstType, typeOfExpression.lookupContext(),
|
||||
&resolvedSymbol, &resolvedName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user