Commit 0fdb3beb authored by Roberto Raggi's avatar Roberto Raggi Committed by Thorbjørn Lindeijer
Browse files

Fixed crash when completing symbols without a valid context.



Task-number: QTCREATORBUG-534
Reviewed-by: default avatarThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
parent 738a950b
......@@ -352,8 +352,10 @@ QList<Scope *> LookupContext::visibleScopes(const QPair<FullySpecifiedType, Symb
QList<Scope *> LookupContext::visibleScopes(Symbol *symbol) const
{
QList<Scope *> scopes;
for (Scope *scope = symbol->scope(); scope; scope = scope->enclosingScope())
scopes.append(scope);
if (symbol) {
for (Scope *scope = symbol->scope(); scope; scope = scope->enclosingScope())
scopes.append(scope);
}
scopes += visibleScopes();
scopes = expand(scopes);
return scopes;
......
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