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:
Thorbjørn Lindeijer
2009-06-12 15:25:14 +02:00
parent 20a270e4ae
commit 7403fe681c

View File

@@ -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);