QmlDesigner: Fix crash in NodeMetaInfoPrivate::create

We changed the QHash and then accessed the invalid iterator.

Change-Id: Ia6f4536cff92776b8d74f96224dee84e3b28fac3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
Marco Bubke
2023-10-05 11:05:42 +02:00
parent be84072066
commit 0775bf3339

View File

@@ -744,8 +744,9 @@ std::shared_ptr<NodeMetaInfoPrivate> NodeMetaInfoPrivate::create(Model *model,
newData->minorVersion());
if (auto found = cache.find(stringfiedQualifiedType); found != cache.end()) {
cache.insert(stringfiedType, *found);
return *found;
newData = *found;
cache.insert(stringfiedType, newData);
return newData;
}
if (stringfiedQualifiedType != stringfiedType)