diff options
author | Christian Kamm <[email protected]> | 2010-02-18 10:37:42 +0100 |
---|---|---|
committer | Christian Kamm <[email protected]> | 2010-02-18 10:39:18 +0100 |
commit | 499f7780e4fa5d31739451a3750e0a04a220f20c (patch) | |
tree | 2d4a3cb891e894d99ed85d72795ebc8c3f727146 /src/libs/qmljs/qmljscheck.cpp | |
parent | cd53a562e89d6620013181c03429c6a7755c029a (diff) |
Fix possible crash in QmlJS semantic checker.
Diffstat (limited to 'src/libs/qmljs/qmljscheck.cpp')
-rw-r--r-- | src/libs/qmljs/qmljscheck.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index e128148d15c..f3d145b6564 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -190,8 +190,11 @@ void Check::checkScopeObjectMember(const AST::UiQualifiedId *id) return; // attached properties - if (! propertyName.isEmpty() && propertyName[0].isUpper()) + if (! propertyName.isEmpty() && propertyName[0].isUpper()) { scopeObject = _context.typeEnvironment(_doc.data()); + if (! scopeObject) + return; + } const Value *value = scopeObject->lookupMember(propertyName, &_context); if (_extraScope && !value) |