diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-01-03 15:02:03 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-01-04 08:55:55 +0100 |
commit | a933e28bd67e29d073ad76312a44e0a89f1db301 (patch) | |
tree | 8e282b2a09e48269ff8d91bc3b97f45ed93ac2ed /tools | |
parent | 32a9015c8f511608d98a9fdf16795b32c52052c3 (diff) |
qmlplugindump: Don't crash on value types with extensions
We have some internal value types without their own base metaobjects,
but with extensions. qmlplugindump is not designed to handle those. Skip
them.
Pick-to: 6.5
Fixes: QTBUG-109562
Change-Id: I3c4925790ac905077e6ea07724c898b32dd6e59a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlplugindump/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 81245232b7..eeb8c6cde3 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -236,7 +236,8 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine, if (ty.isSingleton()) singletons.insert(ty.baseMetaObject()); if (!ty.isComposite()) { - qmlTypesByCppName[ty.baseMetaObject()->className()].insert(ty); + if (const QMetaObject *mo = ty.baseMetaObject()) + qmlTypesByCppName[mo->className()].insert(ty); collectReachableMetaObjects(QQmlEnginePrivate::get(engine), ty, &metas, info); } else { compositeTypes[ty.elementName()].append(ty); |