From 499f7780e4fa5d31739451a3750e0a04a220f20c Mon Sep 17 00:00:00 2001 From: Christian Kamm <christian.d.kamm@nokia.com> Date: Thu, 18 Feb 2010 10:37:42 +0100 Subject: [PATCH] Fix possible crash in QmlJS semantic checker. --- src/libs/qmljs/qmljscheck.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- GitLab