forked from qt-creator/qt-creator
Fixed crash when completing symbols without a valid context.
Task-number: QTCREATORBUG-534 Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
This commit is contained in:
committed by
Thorbjørn Lindeijer
parent
738a950b75
commit
0fdb3bebee
@@ -352,8 +352,10 @@ QList<Scope *> LookupContext::visibleScopes(const QPair<FullySpecifiedType, Symb
|
|||||||
QList<Scope *> LookupContext::visibleScopes(Symbol *symbol) const
|
QList<Scope *> LookupContext::visibleScopes(Symbol *symbol) const
|
||||||
{
|
{
|
||||||
QList<Scope *> scopes;
|
QList<Scope *> scopes;
|
||||||
for (Scope *scope = symbol->scope(); scope; scope = scope->enclosingScope())
|
if (symbol) {
|
||||||
scopes.append(scope);
|
for (Scope *scope = symbol->scope(); scope; scope = scope->enclosingScope())
|
||||||
|
scopes.append(scope);
|
||||||
|
}
|
||||||
scopes += visibleScopes();
|
scopes += visibleScopes();
|
||||||
scopes = expand(scopes);
|
scopes = expand(scopes);
|
||||||
return scopes;
|
return scopes;
|
||||||
|
Reference in New Issue
Block a user