From 1aae77c94da1e5d8e7b1ee6593fee04f710fe4f3 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 30 May 2022 14:15:49 +0200 Subject: Fix missing null-check after component.create() call MinGW got a crash in tst_qqmlqt::dateTimeConversion(), due to the test neglecting to verify that component.create() had succeeeded, when various plugins were missing. Pick-to: 6.4 Change-Id: I6ed5df864b78c689f3c572875115e4eea14748ca Reviewed-by: Ulf Hermann --- tests/auto/qml/qqmlqt/tst_qqmlqt.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/qml/qqmlqt') diff --git a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp index e0ad9bcd57..6ccbecd55a 100644 --- a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp +++ b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp @@ -783,6 +783,7 @@ void tst_qqmlqt::dateTimeConversion() QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("dateTimeConversion.qml")); QScopedPointer obj(component.create()); + QVERIFY2(obj != nullptr, qPrintable(component.errorString())); QCOMPARE(obj->property("qdate").toDate(), date); QCOMPARE(obj->property("qtime").toTime(), time); -- cgit v1.2.3