Commit 885d908e authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed two crashes with C++ engine handling

These checks are necessary cause of a recent change in the C++ engine.

Reviewed-by: Roberto Raggi
parent 678488e7
......@@ -256,7 +256,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
const QList<TypeOfExpression::Result> types =
typeOfExpression(expression, doc, lastSymbol);
if (!types.isEmpty()) {
if (!types.isEmpty() && types.first().first) {
FullySpecifiedType firstType = types.first().first;
Symbol *symbol = types.first().second;
FullySpecifiedType docType = firstType;
......
......@@ -217,7 +217,7 @@ void Scope::enterSymbol(Symbol *symbol)
Symbol *Scope::lookat(Identifier *id) const
{
if (! _hash)
if (! _hash || ! id)
return 0;
const unsigned h = id->hashCode() % _hashSize;
......
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