aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-04-17 12:35:42 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-04-18 12:49:22 +0000
commitea74f0c68cddf706c950d3910cf7b363fe24885b (patch)
tree0524d9abfa9f7b421a4939708678dff6e75f160f /tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml
parenta1b429011df6c04b4ef3731e8d24b4b3b41946a1 (diff)
Don't crash when accessing invalid properties through QObjectWrapper
Change-Id: I613bf5dc685bb4235262b429d8f7318ea144fb9d Fixes: QTBUG-75203 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml b/tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml
new file mode 100644
index 0000000000..7e2f15fc23
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml
@@ -0,0 +1,20 @@
+import QtQuick 2.12
+
+QtObject {
+ property list<QtObject> entries: [
+ QtObject {
+ readonly property color color: "green"
+ },
+ QtObject {
+ }
+ ]
+
+ property Row row: Row {
+ Repeater {
+ model: entries
+ Rectangle {
+ color: model.color ? model.color : "red"
+ }
+ }
+ }
+}