diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-16 03:33:41 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-16 03:33:41 (GMT) |
commit | 1f5170e7556a590eaa6581cf212775208620f934 (patch) | |
tree | 8276aa71fdfd9b3543d376e718a63ed1bf4e960b /src/declarative | |
parent | d6b2b36b02f6c61e91209629dd7af30311014873 (diff) | |
download | Qt-1f5170e7556a590eaa6581cf212775208620f934.zip Qt-1f5170e7556a590eaa6581cf212775208620f934.tar.gz Qt-1f5170e7556a590eaa6581cf212775208620f934.tar.bz2 |
QML binding optimizer crash
We should check that the fetch() generation succeeded before continuing.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qmlcompiledbindings.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/qml/qmlcompiledbindings.cpp b/src/declarative/qml/qmlcompiledbindings.cpp index c9580c7..bc62d9a 100644 --- a/src/declarative/qml/qmlcompiledbindings.cpp +++ b/src/declarative/qml/qmlcompiledbindings.cpp @@ -1881,7 +1881,8 @@ bool QmlBindingCompilerPrivate::parseName(AST::Node *node, Result &type) subscribeName << contextName(); subscribeName << name; - fetch(type, context->metaObject(), reg, d0Idx, subscribeName, nameNodes.at(ii)); + if (!fetch(type, context->metaObject(), reg, d0Idx, subscribeName, nameNodes.at(ii))) + return false; } else if(d1Idx != -1) { Instr instr; instr.common.type = Instr::LoadRoot; @@ -1892,7 +1893,8 @@ bool QmlBindingCompilerPrivate::parseName(AST::Node *node, Result &type) subscribeName << QLatin1String("$$$ROOT"); subscribeName << name; - fetch(type, component->metaObject(), reg, d1Idx, subscribeName, nameNodes.at(ii)); + if (!fetch(type, component->metaObject(), reg, d1Idx, subscribeName, nameNodes.at(ii))) + return false; } else { Instr find; if (nameParts.count() == 1) @@ -1952,8 +1954,7 @@ bool QmlBindingCompilerPrivate::parseName(AST::Node *node, Result &type) if (absType || (wasAttachedObject && idx != -1) || (mo && mo->property(idx).isFinal())) { absType = 0; - fetch(type, mo, reg, idx, subscribeName, nameNodes.at(ii)); - if (type.type == -1) + if (!fetch(type, mo, reg, idx, subscribeName, nameNodes.at(ii))) return false; } else { |