aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp b/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp
index fbcd53cad4..34be4d98b4 100644
--- a/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp
+++ b/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp
@@ -175,8 +175,10 @@ void tst_PropertyRequirements::testQmlType(TestDepth testDepth, const QQmlType &
// check if this type is derived from QObject and even can have signals
// i.e. weed out the Q_GADGET classes
- if (inheritanceHierarchy.first()->className() != QByteArray("QObject"))
+ if (inheritanceHierarchy.isEmpty()
+ || inheritanceHierarchy.constFirst()->className() != QByteArrayLiteral("QObject")) {
return;
+ }
if (testDepth == MainTypeOnly) {
inheritanceHierarchy.clear();