aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljscheck.cpp
diff options
context:
space:
mode:
authorChristian Kamm <[email protected]>2010-02-18 10:42:15 +0100
committerChristian Kamm <[email protected]>2010-02-18 10:42:15 +0100
commit4d5e1a9a0ce48d8c4bc87b4ce82bcf7dd223900e (patch)
treeaa2a8a63bc7ea6e363f0207de47b595bade959dd /src/libs/qmljs/qmljscheck.cpp
parent499f7780e4fa5d31739451a3750e0a04a220f20c (diff)
Fix possible crash in QmlJS semantic checker.
Diffstat (limited to 'src/libs/qmljs/qmljscheck.cpp')
-rw-r--r--src/libs/qmljs/qmljscheck.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp
index f3d145b6564..719ac8bd2f4 100644
--- a/src/libs/qmljs/qmljscheck.cpp
+++ b/src/libs/qmljs/qmljscheck.cpp
@@ -190,11 +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;
- }
+
+ if (! scopeObject)
+ return;
const Value *value = scopeObject->lookupMember(propertyName, &_context);
if (_extraScope && !value)