Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
259007f5
Commit
259007f5
authored
May 11, 2010
by
Christian Kamm
Browse files
QmlJS: Fix potential crash when a document doesn't have a type env yet.
Reviewed-by: Roberto Raggi
parent
04c78632
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljs/qmljsinterpreter.cpp
View file @
259007f5
...
...
@@ -1472,6 +1472,8 @@ const Value *Context::lookup(const QString &name)
const
ObjectValue
*
Context
::
lookupType
(
const
QmlJS
::
Document
*
doc
,
UiQualifiedId
*
qmlTypeName
)
{
const
ObjectValue
*
objectValue
=
typeEnvironment
(
doc
);
if
(
!
objectValue
)
return
0
;
for
(
UiQualifiedId
*
iter
=
qmlTypeName
;
objectValue
&&
iter
;
iter
=
iter
->
next
)
{
if
(
!
iter
->
name
)
...
...
@@ -1490,6 +1492,8 @@ const ObjectValue *Context::lookupType(const QmlJS::Document *doc, UiQualifiedId
const
ObjectValue
*
Context
::
lookupType
(
const
QmlJS
::
Document
*
doc
,
const
QStringList
&
qmlTypeName
)
{
const
ObjectValue
*
objectValue
=
typeEnvironment
(
doc
);
if
(
!
objectValue
)
return
0
;
foreach
(
const
QString
&
name
,
qmlTypeName
)
{
const
Value
*
value
=
objectValue
->
property
(
name
,
this
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment