diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-17 12:35:42 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-18 12:49:22 +0000 |
commit | ea74f0c68cddf706c950d3910cf7b363fe24885b (patch) | |
tree | 0524d9abfa9f7b421a4939708678dff6e75f160f /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | a1b429011df6c04b4ef3731e8d24b4b3b41946a1 (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/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 0e8844d23f..85cad8f62c 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -367,6 +367,7 @@ private slots: void deleteSparseInIteration(); void saveAccumulatorBeforeToInt32(); void intMinDividedByMinusOne(); + void undefinedPropertiesInObjectWrapper(); private: // static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -8958,6 +8959,15 @@ void tst_qqmlecmascript::intMinDividedByMinusOne() QCOMPARE(object->property("doesNotFitInInt").toUInt(), 2147483648u); } +void tst_qqmlecmascript::undefinedPropertiesInObjectWrapper() +{ + QQmlEngine engine; + QQmlComponent component(&engine, testFile("undefinedPropertiesInObjectWrapper.qml")); + QVERIFY(component.isReady()); + QScopedPointer<QObject> object(component.create()); + QVERIFY(!object.isNull()); +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" |