QmlJS: Add missing null checks before using scopeChain().qmlTypes.

This commit is contained in:
Christian Kamm
2010-08-30 13:31:50 +02:00
parent bfad59df64
commit 32bb7bffc0
3 changed files with 6 additions and 3 deletions

View File

@@ -730,7 +730,8 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
m_completions.append(idPropertyCompletion);
addCompletionsPropertyLhs(enumerateProperties(qmlScopeType), symbolIcon, PropertyOrder);
addCompletions(enumerateProperties(context->scopeChain().qmlTypes), symbolIcon, TypeOrder);
if (const Interpreter::ObjectValue *qmlTypes = context->scopeChain().qmlTypes)
addCompletions(enumerateProperties(qmlTypes), symbolIcon, TypeOrder);
if (ScopeBuilder::isPropertyChangesObject(context, qmlScopeType)
&& context->scopeChain().qmlScopeObjects.size() == 2) {