From f14f713c2fd42e94abe55b8fc1b4dabffaa15fda Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 1 Aug 2014 10:13:06 +0200 Subject: Fix crash when loading invalid QML with behavior on invalid group property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Behaviors require the creation of a meta-object. However when trying to create a behavior on a non-existent group property, we don't have a base meta-object to base the "new" meta-object on, therefore this patch adds a null pointer check. The error in the QML file itself will be caught later on. The added test ensures that as well as that it doesn't crash of course. Change-Id: If73116053464e7e69b02ef59e8387060835083c8 Task-number: QTBUG-40369 Reviewed-by: Sérgio Martins Reviewed-by: Lars Knoll --- tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml (limited to 'tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml') diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml new file mode 100644 index 0000000000..86c5f3bd7d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 +Item { + id: root + NumberAnimation on root.opacity { duration: 1000 } +} -- cgit v1.2.3