summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-05-08 14:32:12 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2009-05-08 14:32:12 (GMT)
commit445c06ef96158befe035a0b45c613e4931d76e82 (patch)
tree0f678ae5fde4b769cb050827dfc4b5a975876e80 /src/declarative
parent7d67d5c24ce3e707c1bb9bc6f181765cccc4090d (diff)
downloadQt-445c06ef96158befe035a0b45c613e4931d76e82.zip
Qt-445c06ef96158befe035a0b45c613e4931d76e82.tar.gz
Qt-445c06ef96158befe035a0b45c613e4931d76e82.tar.bz2
Fixed possible crash when processing Ui object definitions.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index 8506933..0092ec2 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -226,9 +226,12 @@ ProcessAST::defineObjectBinding_helper(int line,
return 0;
}
- _stateStack.pushProperty(objectType,
- this->location(propertyName));
- accept(initializer);
+ SourceLocation loc = typeLocation;
+ if (propertyName)
+ loc = location(propertyName);
+
+ _stateStack.pushProperty(objectType, loc);
+ accept(initializer);
_stateStack.pop();
return 0;